From 8bd68b5e77a5681de244d737ff391153a7234267 Mon Sep 17 00:00:00 2001 From: "Collin Schedler (MSFT)" <63803691+CollinSchedler@users.noreply.github.com> Date: Mon, 7 Jun 2021 18:59:43 -0700 Subject: [PATCH 01/37] Internet analyzer update to track2 (#3442) --- src/internet-analyzer/HISTORY.rst | 4 + .../azext_internet_analyzer/custom.py | 12 +- .../recordings/test_internet_analyzer.yaml | 1628 +++------ .../vendored_sdks/frontdoor/__init__.py | 18 +- .../vendored_sdks/frontdoor/_configuration.py | 82 +- .../_front_door_management_client.py | 118 +- .../frontdoor/{version.py => _version.py} | 10 +- .../vendored_sdks/frontdoor/aio/__init__.py | 10 + .../frontdoor/aio/_configuration.py | 66 + .../aio/_front_door_management_client.py | 119 + .../frontdoor/aio/operations/__init__.py | 35 + .../aio/operations/_endpoints_operations.py | 164 + .../aio/operations/_experiments_operations.py | 583 ++++ ...front_door_name_availability_operations.py | 96 + ...ailability_with_subscription_operations.py | 100 + .../aio/operations/_front_doors_operations.py | 552 ++++ .../_frontend_endpoints_operations.py | 427 +++ .../_managed_rule_sets_operations.py | 109 + ..._network_experiment_profiles_operations.py | 623 ++++ .../aio/operations/_policies_operations.py | 412 +++ .../_preconfigured_endpoints_operations.py | 119 + .../aio/operations/_reports_operations.py | 214 ++ .../operations/_rules_engines_operations.py | 439 +++ .../frontdoor/models/__init__.py | 355 +- .../_front_door_management_client_enums.py | 783 +++-- .../vendored_sdks/frontdoor/models/_models.py | 2603 ++++++++++----- .../frontdoor/models/_models_py3.py | 2935 ++++++++++++----- .../frontdoor/operations/__init__.py | 15 +- .../operations/_endpoints_operations.py | 201 +- .../operations/_experiments_operations.py | 734 +++-- ...front_door_name_availability_operations.py | 101 + ...ailability_with_subscription_operations.py | 105 + .../operations/_front_doors_operations.py | 726 ++-- .../_frontend_endpoints_operations.py | 543 +-- .../_managed_rule_sets_operations.py | 124 +- ..._network_experiment_profiles_operations.py | 800 +++-- .../operations/_policies_operations.py | 515 +-- .../_preconfigured_endpoints_operations.py | 140 +- .../operations/_reports_operations.py | 252 +- .../operations/_rules_engines_operations.py | 449 +++ src/internet-analyzer/setup.py | 4 +- 41 files changed, 12142 insertions(+), 5183 deletions(-) rename src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/{version.py => _version.py} (84%) create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/__init__.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_configuration.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_front_door_management_client.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/__init__.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_endpoints_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_experiments_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_with_subscription_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_doors_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_frontend_endpoints_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_managed_rule_sets_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_network_experiment_profiles_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_policies_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_preconfigured_endpoints_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_reports_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_rules_engines_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_with_subscription_operations.py create mode 100644 src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_rules_engines_operations.py diff --git a/src/internet-analyzer/HISTORY.rst b/src/internet-analyzer/HISTORY.rst index 4f3369205f9..f812c0d835c 100644 --- a/src/internet-analyzer/HISTORY.rst +++ b/src/internet-analyzer/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.0rc6 +++++++ +* Migrate to Track2 SDK. + 0.1.0rc5 ++++++ * Remove the limitation of max compatible cli core version diff --git a/src/internet-analyzer/azext_internet_analyzer/custom.py b/src/internet-analyzer/azext_internet_analyzer/custom.py index 827a2f85ea0..703dc8d505a 100644 --- a/src/internet-analyzer/azext_internet_analyzer/custom.py +++ b/src/internet-analyzer/azext_internet_analyzer/custom.py @@ -19,7 +19,7 @@ def create_internet_analyzer_profile(cmd, client, body['location'] = location # str body['tags'] = tags # dictionary body['enabled_state'] = enabled_state # str - return client.create_or_update(resource_group_name=resource_group, profile_name=name, parameters=body) + return client.begin_create_or_update(resource_group_name=resource_group, profile_name=name, parameters=body) def update_internet_analyzer_profile(cmd, client, @@ -35,13 +35,13 @@ def update_internet_analyzer_profile(cmd, client, body['tags'] = tags # dictionary if enabled_state is not None: body['enabled_state'] = enabled_state # str - return client.create_or_update(resource_group_name=resource_group, profile_name=name, parameters=body) + return client.begin_create_or_update(resource_group_name=resource_group, profile_name=name, parameters=body) def delete_internet_analyzer_profile(cmd, client, resource_group, name): - return client.delete(resource_group_name=resource_group, profile_name=name) + return client.begin_delete(resource_group_name=resource_group, profile_name=name) def list_internet_analyzer_profile(cmd, client, @@ -84,7 +84,7 @@ def create_internet_analyzer_test(cmd, client, body.setdefault('endpoint_b', {})['name'] = endpoint_b_name # str body.setdefault('endpoint_b', {})['endpoint'] = endpoint_b_endpoint # str body['enabled_state'] = enabled_state # str - return client.create_or_update(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name, parameters=body) + return client.begin_create_or_update(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name, parameters=body) def update_internet_analyzer_test(cmd, client, @@ -116,14 +116,14 @@ def update_internet_analyzer_test(cmd, client, body.setdefault('endpoint_b', {})['endpoint'] = endpoint_b_endpoint # str if enabled_state is not None: body['enabled_state'] = enabled_state # str - return client.create_or_update(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name, parameters=body) + return client.begin_create_or_update(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name, parameters=body) def delete_internet_analyzer_test(cmd, client, resource_group, profile_name, name): - return client.delete(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name) + return client.begin_delete(resource_group_name=resource_group, profile_name=profile_name, experiment_name=name) def list_internet_analyzer_test(cmd, client, diff --git a/src/internet-analyzer/azext_internet_analyzer/tests/latest/recordings/test_internet_analyzer.yaml b/src/internet-analyzer/azext_internet_analyzer/tests/latest/recordings/test_internet_analyzer.yaml index bc9d21fdda3..ce0b91da0f4 100644 --- a/src/internet-analyzer/azext_internet_analyzer/tests/latest/recordings/test_internet_analyzer.yaml +++ b/src/internet-analyzer/azext_internet_analyzer/tests/latest/recordings/test_internet_analyzer.yaml @@ -1,63 +1,4 @@ interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:39:03 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AvhdNwayAmRCoxkB44m4R_0; expires=Wed, 04-Dec-2019 02:39:03 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7v3eMNcFILz1YO0DfhiosRLbWlqwIdkRM6tiALdr91t7A5dJkFw1r3vr6WXCAKzt075A4HsYS3xOXKzwz4f_sIZ7LA2tKJjAYftbvG2nbocm2Q0csNm2u379C_nQYsO7cuCxvMuTCMwZBSnFhmsKoqDoAlSPCuYDKDK4GBZvq-UwgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: '{"location": "WestUs", "properties": {"enabledState": "Enabled"}}' headers: @@ -72,22 +13,18 @@ interactions: Content-Length: - '65' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --enabled-state --location User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n \ - \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\"\ - :\"Enabled\",\"resourceState\":\"Enabled\"\r\n }\r\n}" + string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\",\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n + \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -96,7 +33,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:39:23 GMT + - Fri, 28 May 2021 21:15:29 GMT expires: - '-1' odata-version: @@ -104,7 +41,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: @@ -123,65 +60,6 @@ interactions: headers: Accept: - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:39:53 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AuiJWH_5tSxMhiHo-LWrdOY; expires=Wed, 04-Dec-2019 02:39:54 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7-P80IbReVj2DFyCsCq_2j6N6c_nzvWsHvIO4Jx8NPX_lTq3UUDt9WlBHgCI9rJ-KA_OGYzOTNU9UxO7YRd14SvDxmUMvVf7osRciM-cbNK8_ejrqf1u5dorP7bbUOmEXFYoMKKzX1AgFSKx1qDQlC_19ZkpVnB46lXs6TnL6hJsgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -191,16 +69,14 @@ interactions: ParameterSetName: - --resource-group --name --enabled-state --location User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n \ - \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\"\ - :\"Enabled\",\"resourceState\":\"Enabled\"\r\n }\r\n}" + string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\",\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n + \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -209,7 +85,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:39:58 GMT + - Fri, 28 May 2021 21:16:01 GMT expires: - '-1' odata-version: @@ -217,7 +93,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -233,65 +109,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:00 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AoNpVfIDbOVApj5dU1ivL7g; expires=Wed, 04-Dec-2019 02:40:00 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj72PmpbDqUm6Niolwo3BSfZbTgLa7Pz3oN8phcwM2aEZGlBM_PMXbHDL3bxweHgAPjnce43INfwrZ6dfYGTpr7Sohh0-hdTOp48YbaiCwuW7wbvBZlm8fdP1AXsQoPfg6_aKYrnTmaddx5yKZhiAHicd_vef_6n97219fUKE3MPEIgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: '{"properties": {"description": "this is my first experiment!", "endpointA": {"name": "endpoint A", "endpoint": "endpointA.net"}, "endpointB": {"name": "endpoint @@ -308,35 +125,31 @@ interactions: Content-Length: - '222' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --profile-name --name --description --endpoint-a-name --endpoint-a-endpoint --endpoint-b-name --endpoint-b-endpoint --enabled-state User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\"\ - :{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\"\ - :\"this is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/dbfbc53f164a47e5ae7b4294d26e8aec/ab.min.js\"\ - ,\"status\":null,\"endpointA\":{\r\n \"name\":\"endpoint A\",\"endpoint\"\ - :\"endpointA.net\"\r\n },\"endpointB\":{\r\n \"name\":\"endpoint B\"\ - ,\"endpoint\":\"endpointB.net\"\r\n }\r\n }\r\n}" + string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\",\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\":{\r\n + \ \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\":\"this + is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/3a7f7f1928374241b1367806598c6ef0/ab.min.js\",\"status\":\"Created\",\"endpointA\":{\r\n + \ \"name\":\"endpoint A\",\"endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n + \ \"name\":\"endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n + \ }\r\n}" headers: cache-control: - no-cache content-length: - - '712' + - '717' content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:07 GMT + - Fri, 28 May 2021 21:16:08 GMT expires: - '-1' odata-version: @@ -344,7 +157,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: @@ -363,65 +176,6 @@ interactions: headers: Accept: - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:39 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AvOn4xRmizpCouz61S4KMNc; expires=Wed, 04-Dec-2019 02:40:39 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7GlWdaxWNtGrauSiqdAwSxGG2FGWjPJH7W78R9-V7HQt2rg2gYd_zHeBDVUcaK-IoY-SAfPdA09lVNUJ6n91hI8TGiMokJsnA_1VMIkVkw2pB2RWPipMgB3L-SiSPzxyXJDxgh7HVqZMGxlLWSqcarRv0VJy-hxc9PH6A5rlvZcEgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -432,19 +186,17 @@ interactions: - --resource-group --profile-name --name --description --endpoint-a-name --endpoint-a-endpoint --endpoint-b-name --endpoint-b-endpoint --enabled-state User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\"\ - :{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\"\ - :\"this is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/dbfbc53f164a47e5ae7b4294d26e8aec/ab.min.js\"\ - ,\"status\":\"Enabled\",\"endpointA\":{\r\n \"name\":\"endpoint A\",\"\ - endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n \"name\":\"\ - endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n }\r\n}" + string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\",\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\":{\r\n + \ \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\":\"this + is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/3a7f7f1928374241b1367806598c6ef0/ab.min.js\",\"status\":\"Created\",\"endpointA\":{\r\n + \ \"name\":\"endpoint A\",\"endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n + \ \"name\":\"endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -453,7 +205,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:43 GMT + - Fri, 28 May 2021 21:16:40 GMT expires: - '-1' odata-version: @@ -461,7 +213,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -477,65 +229,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:43 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=Anda_RoeuadKkGlISsdohdk; expires=Wed, 04-Dec-2019 02:40:44 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7noSGeNHU-1M3nwnCvJUlBGF-NrjtCo-GFZOb3yQgVuidwWrPSWmae1lXmQ2prh2eygG-3Xdiwu9q4hy_iqr7DAammZvGpRYhSbjaB3uh31peNJJQyQqDdykxX5hpvus8t3yhifALln4_fAvVkE5AuLmlzUARMOI_M7Na7edkLtogAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -550,20 +243,14 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles?api-version=2019-11-01 response: body: - string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"MyProfile\",\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n \ - \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"\ - enabledState\":\"Enabled\",\"resourceState\":\"Enabled\"\r\n }\r\n \ - \ }\r\n ]\r\n}" + string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\",\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n + \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache @@ -572,7 +259,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:49 GMT + - Fri, 28 May 2021 21:16:42 GMT expires: - '-1' odata-version: @@ -580,7 +267,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -596,65 +283,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:49 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AoGZsnisBxxKj-nPrzE-60g; expires=Wed, 04-Dec-2019 02:40:49 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7Z-mMpwOTyHt0oIYA0B6TpcvztwAOpbcdEXO0HaREryvLgJlNvcRXXUBLRdMte-zAQLqC3E8MykQL8it0rJdV5R729W_wxSE4uD9xtDeABeU-KmNO0iVKcURy8-XzWjaZ1tFd7V0KnfZxPi7clsOREpeuXTpb_vZCV6M8fQolL34gAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -669,18 +297,14 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n \ - \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\"\ - :\"Enabled\",\"resourceState\":\"Enabled\"\r\n }\r\n}" + string: "{\r\n \"name\":\"MyProfile\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile\",\"type\":\"Microsoft.Network/networkexperimentprofiles\",\"tags\":{\r\n + \ \r\n },\"location\":\"WestUs\",\"properties\":{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -689,7 +313,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:52 GMT + - Fri, 28 May 2021 21:16:44 GMT expires: - '-1' odata-version: @@ -697,7 +321,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -713,65 +337,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:53 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=Avz9jPUzBmVNiZoZNP8fw_g; expires=Wed, 04-Dec-2019 02:40:54 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7OwJXgZs3SyC5NByG3YNmVPhucCbgEXHTbVvcKoYjLsFv65pnQN_R5mntYR0f9fi9YS66aWwu-z1ae5enAoCA3Ru0E0PQZpUQ4ccVwMuDZfWjIud0wrpYxVmJsGm3OyavIr1UTh1RiIYm7Y1fmhvcKb5qGR-MijXnzZKbpnIh9jQgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -786,21 +351,17 @@ interactions: ParameterSetName: - --resource-group --profile-name --name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 response: body: - string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\"\ - :{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\"\ - :\"this is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/dbfbc53f164a47e5ae7b4294d26e8aec/ab.min.js\"\ - ,\"status\":\"Enabled\",\"endpointA\":{\r\n \"name\":\"endpoint A\",\"\ - endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n \"name\":\"\ - endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n }\r\n}" + string: "{\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\",\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\":{\r\n + \ \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\":\"this + is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/3a7f7f1928374241b1367806598c6ef0/ab.min.js\",\"status\":\"Created\",\"endpointA\":{\r\n + \ \"name\":\"endpoint A\",\"endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n + \ \"name\":\"endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -809,7 +370,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:56 GMT + - Fri, 28 May 2021 21:16:48 GMT expires: - '-1' odata-version: @@ -817,7 +378,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -833,65 +394,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:57 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=ArxDCTwvnuhLvfFVdpmhk4I; expires=Wed, 04-Dec-2019 02:40:57 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7kbtfqkMvcYmHoVQXPxn_o0g2KvSIPTo4bKzXVu78xupXrKgyRhngCmq8aqWiARSVw-tqhyBYc2Aa89RpFUqeZusMAZUpfY8jFWUMIZKIxJVbM-3tS3frJ747PeFkBcotAjjOG5JZ0Kjj7XL1zp1IYz2mQ8j8zXjWTsi_iDlLs6ggAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -906,23 +408,17 @@ interactions: ParameterSetName: - --resource-group --profile-name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments?api-version=2019-11-01 response: body: - string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"MyExperiment\",\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\"\ - ,\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\"\ - :{\r\n \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"\ - description\":\"this is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/dbfbc53f164a47e5ae7b4294d26e8aec/ab.min.js\"\ - ,\"status\":\"Enabled\",\"endpointA\":{\r\n \"name\":\"endpoint A\"\ - ,\"endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n \ - \ \"name\":\"endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n\ - \ }\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\":[\r\n {\r\n \"name\":\"MyExperiment\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment\",\"type\":\"Microsoft.Network/networkexperimentprofiles/experiments\",\"properties\":{\r\n + \ \"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"description\":\"this + is my first experiment!\",\"scriptFileUri\":\"https://fpc.msedge.net/client/v2/3a7f7f1928374241b1367806598c6ef0/ab.min.js\",\"status\":\"Created\",\"endpointA\":{\r\n + \ \"name\":\"endpoint A\",\"endpoint\":\"endpointA.net\"\r\n },\"endpointB\":{\r\n + \ \"name\":\"endpoint B\",\"endpoint\":\"endpointB.net\"\r\n }\r\n + \ }\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache @@ -931,7 +427,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:40:58 GMT + - Fri, 28 May 2021 21:16:51 GMT expires: - '-1' odata-version: @@ -939,7 +435,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -955,65 +451,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:40:59 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=Ahiod70QI_JIjVHvF-W-mXE; expires=Wed, 04-Dec-2019 02:40:59 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7ziAF4oV4wwYHmqE0fyrwzCp1HrzJJMv4zwkzslfOGci79Fyrit3cgQUh-jHKm4sN-8Rm0et9Kbe3Bztx0mFY0O_-8joDAIFGySh17zUahtn9HicOOfbfMI8VjHQ7serDGMgs5oOEPRkUpyONuDKF8p_3-ldIbUgDAz6cdC1I31QgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -1028,341 +465,293 @@ interactions: ParameterSetName: - --resource-group --profile-name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/PreconfiguredEndpoints?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/PreconfiguredEndpoints?api-version=2019-11-01 response: body: - string: "{\r\n \"nextLink\":null,\"value\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure West Europe Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"am2prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"West Europe Region\",\"backend\":\"West Europe\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure East US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"bl2prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"East US Region\",\"backend\":\"East US\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure West US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"by1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"West US Region\",\"backend\":\"West US\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure Brazil South Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"cq1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"Brazil South Region\",\"backend\":\"Brazil South\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure UK West Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"cw1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"UK West Region\",\"backend\":\"UK West\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure North Europe Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"db3prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"North Europe Region\",\"backend\":\"North Europe\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure Central US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"dm1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"Central US Region\",\"backend\":\"Central US\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure UAE North Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"dxb20prdapp02-canary-opaph.azr.footprintdns.com\"\ - ,\"description\":\"UAE North Region\",\"backend\":\"UAE North\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure East Asia Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"hk2prdapp02-canary.azr.footprintdns.com\"\ - ,\"description\":\"East Asia Region\",\"backend\":\"East Asia\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure South Africa North Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"jnb20prdapp02-canary-opaph.azr.footprintdns.com\"\ - ,\"description\":\"South Africa North Region\",\"backend\":\"South Africa\ - \ North\",\"endpointType\":\"AzureRegion\"\r\n }\r\n },{\r\n \ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West US, West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion1.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West US, West Europe\",\"backend\":\"West US, West Europe\"\ - ,\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West Europe, UAE North, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion10.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West Europe, UAE North, Southeast Asia\",\"backend\":\"West\ - \ Europe, UAE North, Southeast Asia\",\"endpointType\":\"ATM\"\r\n }\r\ - \n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West US, North Europe, Southeast Asia, UAE North, South\ - \ Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion11.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West US, North Europe, Southeast Asia, UAE North, South Africa\ - \ North\",\"backend\":\"West US, North Europe, Southeast Asia, UAE North,\ - \ South Africa North\",\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n\ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - East US, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion2.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of East US, East Asia\",\"backend\":\"East US, East Asia\",\"\ - endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West US, East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion3.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West US, East US\",\"backend\":\"West US, East US\",\"endpointType\"\ - :\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West US, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion4.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West US, UAE North\",\"backend\":\"West US, UAE North\",\"\ - endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - East US, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion5.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of East US, Brazil South\",\"backend\":\"East US, Brazil South\"\ - ,\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West Europe, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion6.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West Europe, Southeast Asia\",\"backend\":\"West Europe, Southeast\ - \ Asia\",\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West Europe, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion7.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West Europe, Brazil South\",\"backend\":\"West Europe, Brazil\ - \ South\",\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West Europe, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion8.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West Europe, UAE North\",\"backend\":\"West Europe, UAE North\"\ - ,\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"ATM - West US, West Europe, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maiaatm-multiregion9.azr.footprintdns.com\"\ - ,\"description\":\"Azure Traffic Manager routing requests to the best performing\ - \ region out of West US, West Europe, East Asia\",\"backend\":\"West US, West\ - \ Europe, East Asia\",\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-brazilsouth.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a Brazil South origin\"\ - ,\"backend\":\"Brazil South\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-brazilsouth.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a Brazil\ - \ South endpoint\",\"backend\":\"Brazil South\",\"endpointType\":\"AFD\"\r\ - \n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - Central India\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-centralindia.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a Central India origin\"\ - ,\"backend\":\"Central India\",\"endpointType\":\"CDN\"\r\n }\r\n \ - \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - Central India\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-centralindia.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a Central\ - \ India endpoint\",\"backend\":\"Central India\",\"endpointType\":\"AFD\"\r\ - \n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - Central US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-centralus.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a Central US origin\"\ - ,\"backend\":\"Central US\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - Central US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-centralus.azurefd.net\",\"\ - description\":\"Azure Front Door instance forwarding requests to a Central\ - \ US endpoint\",\"backend\":\"Central US\",\"endpointType\":\"AFD\"\r\n \ - \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-eastasia.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a East Asia origin\"\ - ,\"backend\":\"East Asia\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-eastasia.azurefd.net\",\"\ - description\":\"Azure Front Door instance forwarding requests to a East Asia\ - \ endpoint\",\"backend\":\"East Asia\",\"endpointType\":\"AFD\"\r\n }\r\ - \n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-eastus.azureedge.net\",\"\ - description\":\"Microsoft Azure CDN instance with a East US origin\",\"backend\"\ - :\"East US\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n \"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-eastus.azurefd.net\",\"description\"\ - :\"Azure Front Door instance forwarding requests to a East US endpoint\",\"\ - backend\":\"East US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - Japan West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-japanwest.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a Japan West origin\"\ - ,\"backend\":\"Japan West\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - Japan West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-japanwest.azurefd.net\",\"\ - description\":\"Azure Front Door instance forwarding requests to a Japan West\ - \ endpoint\",\"backend\":\"Japan West\",\"endpointType\":\"AFD\"\r\n \ - \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US, West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion1.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West US, West Europe\",\"backend\":\"West US, West\ - \ Europe\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West Europe, UAE North, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion10.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West Europe, UAE North, Southeast Asia\",\"backend\"\ - :\"West Europe, UAE North, Southeast Asia\",\"endpointType\":\"AFD\"\r\n \ - \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US, North Europe, Southeast Asia, UAE North, South\ - \ Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion11.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West US, North Europe, Southeast Asia, UAE North,\ - \ South Africa North\",\"backend\":\"West US, North Europe, Southeast Asia,\ - \ UAE North, South Africa North\",\"endpointType\":\"AFD\"\r\n }\r\n\ - \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - East US, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion2.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of East US, East Asia\",\"backend\":\"East US, East\ - \ Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US, East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion3.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West US, East US\",\"backend\":\"West US, East\ - \ US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion4.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West US, UAE North\",\"backend\":\"West US, UAE\ - \ North\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - East US, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion5.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of East US, Brazil South\",\"backend\":\"East US,\ - \ Brazil South\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"\ - id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West Europe, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion6.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West Europe, Southeast Asia\",\"backend\":\"West\ - \ Europe, Southeast Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West Europe, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion7.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West Europe, Brazil South\",\"backend\":\"West\ - \ Europe, Brazil South\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n\ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West Europe, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion8.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West Europe, UAE North\",\"backend\":\"West Europe,\ - \ UAE North\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US, West Europe, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-multiregion9.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to the best\ - \ performing region out of West US, West Europe, East Asia\",\"backend\":\"\ - West US, West Europe, East Asia\",\"endpointType\":\"AFD\"\r\n }\r\n\ - \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - North Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-northeurope.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a North Europe origin\"\ - ,\"backend\":\"North Europe\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - North Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-northeurope.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a North\ - \ Europe endpoint\",\"backend\":\"North Europe\",\"endpointType\":\"AFD\"\r\ - \n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-southafricanorth.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a South Africa North\ - \ origin\",\"backend\":\"South Africa North\",\"endpointType\":\"CDN\"\r\n\ - \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-southafricanorth.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a South\ - \ Africa North endpoint\",\"backend\":\"South Africa North\",\"endpointType\"\ - :\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-southeastasia.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a Southeast Asia origin\"\ - ,\"backend\":\"Southeast Asia\",\"endpointType\":\"CDN\"\r\n }\r\n \ - \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-southeastasia.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a Southeast\ - \ Asia endpoint\",\"backend\":\"Southeast Asia\",\"endpointType\":\"AFD\"\r\ - \n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-uaenorth.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a UAE North origin\"\ - ,\"backend\":\"UAE North\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-uaenorth.azurefd.net\",\"\ - description\":\"Azure Front Door instance forwarding requests to a UAE North\ - \ endpoint\",\"backend\":\"UAE North\",\"endpointType\":\"AFD\"\r\n }\r\ - \n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - UK West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-ukwest.azureedge.net\",\"\ - description\":\"Microsoft Azure CDN instance with a UK West origin\",\"backend\"\ - :\"UK West\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n \"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - UK West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-ukwest.azurefd.net\",\"description\"\ - :\"Azure Front Door instance forwarding requests to a UK West endpoint\",\"\ - backend\":\"UK West\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westeurope.azureedge.net\"\ - ,\"description\":\"Microsoft Azure CDN instance with a West Europe origin\"\ - ,\"backend\":\"West Europe\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\ - \n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westeurope.azurefd.net\"\ - ,\"description\":\"Azure Front Door instance forwarding requests to a West\ - \ Europe endpoint\",\"backend\":\"West Europe\",\"endpointType\":\"AFD\"\r\ - \n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - West US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westus.azureedge.net\",\"\ - description\":\"Microsoft Azure CDN instance with a West US origin\",\"backend\"\ - :\"West US\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n \"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westus.azurefd.net\",\"description\"\ - :\"Azure Front Door instance forwarding requests to a West US endpoint\",\"\ - backend\":\"West US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"CDN - West US 2\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westus2.azureedge.net\",\"\ - description\":\"Microsoft Azure CDN instance with a West US 2 origin\",\"\ - backend\":\"West US 2\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n\ - \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"AFD - West US 2\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"maia-westus2.azurefd.net\",\"\ - description\":\"Azure Front Door instance forwarding requests to a West US\ - \ 2 endpoint\",\"backend\":\"West US 2\",\"endpointType\":\"AFD\"\r\n \ - \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure West US 2 Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"mwh01prdapp02-canary.azr.footprintdns.com\"\ - ,\"description\":\"West US 2 Region\",\"backend\":\"West US 2\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure Japan West Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"os1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"Japan West Region\",\"backend\":\"Japan West\",\"endpointType\"\ - :\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure Central India Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"pn1prdapp01-canary.azr.footprintdns.com\"\ - ,\"description\":\"Central India Region\",\"backend\":\"Central India\",\"\ - endpointType\":\"AzureRegion\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\"\ - ,\"name\":\"Azure Southeast Asia Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\"\ - ,\"properties\":{\r\n \"endpoint\":\"sg1prdapp02-canary.azr.footprintdns.com\"\ - ,\"description\":\"Southeast Asia Region\",\"backend\":\"Southeast Asia\"\ - ,\"endpointType\":\"AzureRegion\"\r\n }\r\n }\r\n ]\r\n}" + string: "{\r\n \"nextLink\":null,\"value\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + West Europe Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"am2prdapp01-canary.azr.footprintdns.com\",\"description\":\"West + Europe Region\",\"backend\":\"West Europe\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + East US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"bl2prdapp01-canary.azr.footprintdns.com\",\"description\":\"East + US Region\",\"backend\":\"East US\",\"endpointType\":\"AzureRegion\"\r\n }\r\n + \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + West US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"by1prdapp01-canary.azr.footprintdns.com\",\"description\":\"West + US Region\",\"backend\":\"West US\",\"endpointType\":\"AzureRegion\"\r\n }\r\n + \ },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + Brazil South Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"cq1prdapp01-canary.azr.footprintdns.com\",\"description\":\"Brazil + South Region\",\"backend\":\"Brazil South\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + UK West Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"cw1prdapp01-canary.azr.footprintdns.com\",\"description\":\"UK + West Region\",\"backend\":\"UK West\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + North Europe Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"db3prdapp01-canary.azr.footprintdns.com\",\"description\":\"North + Europe Region\",\"backend\":\"North Europe\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + Central US Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"dm1prdapp01-canary.azr.footprintdns.com\",\"description\":\"Central + US Region\",\"backend\":\"Central US\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + UAE North Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"dxb20prdapp02-canary-opaph.azr.footprintdns.com\",\"description\":\"UAE + North Region\",\"backend\":\"UAE North\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + East Asia Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"hk2prdapp02-canary.azr.footprintdns.com\",\"description\":\"East + Asia Region\",\"backend\":\"East Asia\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + South Africa North Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"jnb20prdapp02-canary-opaph.azr.footprintdns.com\",\"description\":\"South + Africa North Region\",\"backend\":\"South Africa North\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West US, West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion1.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + US, West Europe\",\"backend\":\"West US, West Europe\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West Europe, UAE North, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion10.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + Europe, UAE North, Southeast Asia\",\"backend\":\"West Europe, UAE North, + Southeast Asia\",\"endpointType\":\"ATM\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West US, North Europe, Southeast Asia, UAE North, South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion11.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + US, North Europe, Southeast Asia, UAE North, South Africa North\",\"backend\":\"West + US, North Europe, Southeast Asia, UAE North, South Africa North\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - East US, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion2.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of East + US, East Asia\",\"backend\":\"East US, East Asia\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West US, East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion3.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + US, East US\",\"backend\":\"West US, East US\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West US, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion4.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + US, UAE North\",\"backend\":\"West US, UAE North\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - East US, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion5.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of East + US, Brazil South\",\"backend\":\"East US, Brazil South\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West Europe, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion6.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + Europe, Southeast Asia\",\"backend\":\"West Europe, Southeast Asia\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West Europe, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion7.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + Europe, Brazil South\",\"backend\":\"West Europe, Brazil South\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West Europe, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion8.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + Europe, UAE North\",\"backend\":\"West Europe, UAE North\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"ATM + - West US, West Europe, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maiaatm-multiregion9.azr.footprintdns.com\",\"description\":\"Azure + Traffic Manager routing requests to the best performing region out of West + US, West Europe, East Asia\",\"backend\":\"West US, West Europe, East Asia\",\"endpointType\":\"ATM\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-brazilsouth.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a Brazil South origin\",\"backend\":\"Brazil South\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-brazilsouth.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a Brazil South endpoint\",\"backend\":\"Brazil + South\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - Central India\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-centralindia.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a Central India origin\",\"backend\":\"Central India\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - Central India\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-centralindia.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a Central India endpoint\",\"backend\":\"Central + India\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - Central US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-centralus.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a Central US origin\",\"backend\":\"Central US\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - Central US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-centralus.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a Central US endpoint\",\"backend\":\"Central + US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-eastasia.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a East Asia origin\",\"backend\":\"East Asia\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-eastasia.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a East Asia endpoint\",\"backend\":\"East + Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-eastus.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a East US origin\",\"backend\":\"East US\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-eastus.azurefd.net\",\"description\":\"Azure Front + Door instance forwarding requests to a East US endpoint\",\"backend\":\"East + US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - Japan West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-japanwest.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a Japan West origin\",\"backend\":\"Japan West\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - Japan West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-japanwest.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a Japan West endpoint\",\"backend\":\"Japan + West\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US, West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion1.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West US, West Europe\",\"backend\":\"West US, West Europe\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West Europe, UAE North, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion10.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West Europe, UAE North, Southeast Asia\",\"backend\":\"West Europe, UAE + North, Southeast Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US, North Europe, Southeast Asia, UAE North, South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion11.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West US, North Europe, Southeast Asia, UAE North, South Africa North\",\"backend\":\"West + US, North Europe, Southeast Asia, UAE North, South Africa North\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - East US, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion2.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of East US, East Asia\",\"backend\":\"East US, East Asia\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US, East US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion3.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West US, East US\",\"backend\":\"West US, East US\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion4.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West US, UAE North\",\"backend\":\"West US, UAE North\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - East US, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion5.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of East US, Brazil South\",\"backend\":\"East US, Brazil South\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West Europe, Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion6.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West Europe, Southeast Asia\",\"backend\":\"West Europe, Southeast Asia\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West Europe, Brazil South\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion7.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West Europe, Brazil South\",\"backend\":\"West Europe, Brazil South\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West Europe, UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion8.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West Europe, UAE North\",\"backend\":\"West Europe, UAE North\",\"endpointType\":\"AFD\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US, West Europe, East Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-multiregion9.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to the best performing region out + of West US, West Europe, East Asia\",\"backend\":\"West US, West Europe, East + Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - North Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-northeurope.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a North Europe origin\",\"backend\":\"North Europe\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - North Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-northeurope.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a North Europe endpoint\",\"backend\":\"North + Europe\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-southafricanorth.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a South Africa North origin\",\"backend\":\"South + Africa North\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - South Africa North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-southafricanorth.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a South Africa North endpoint\",\"backend\":\"South + Africa North\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-southeastasia.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a Southeast Asia origin\",\"backend\":\"Southeast + Asia\",\"endpointType\":\"CDN\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - Southeast Asia\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-southeastasia.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a Southeast Asia endpoint\",\"backend\":\"Southeast + Asia\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-uaenorth.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a UAE North origin\",\"backend\":\"UAE North\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - UAE North\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-uaenorth.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a UAE North endpoint\",\"backend\":\"UAE + North\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - UK West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-ukwest.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a UK West origin\",\"backend\":\"UK West\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - UK West\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-ukwest.azurefd.net\",\"description\":\"Azure Front + Door instance forwarding requests to a UK West endpoint\",\"backend\":\"UK + West\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westeurope.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a West Europe origin\",\"backend\":\"West Europe\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West Europe\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westeurope.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a West Europe endpoint\",\"backend\":\"West + Europe\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - West US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westus.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a West US origin\",\"backend\":\"West US\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westus.azurefd.net\",\"description\":\"Azure Front + Door instance forwarding requests to a West US endpoint\",\"backend\":\"West + US\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"CDN + - West US 2\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westus2.azureedge.net\",\"description\":\"Microsoft + Azure CDN instance with a West US 2 origin\",\"backend\":\"West US 2\",\"endpointType\":\"CDN\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"AFD + - West US 2\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"maia-westus2.azurefd.net\",\"description\":\"Azure + Front Door instance forwarding requests to a West US 2 endpoint\",\"backend\":\"West + US 2\",\"endpointType\":\"AFD\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + West US 2 Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"mwh01prdapp02-canary.azr.footprintdns.com\",\"description\":\"West + US 2 Region\",\"backend\":\"West US 2\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + Japan West Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"os1prdapp01-canary.azr.footprintdns.com\",\"description\":\"Japan + West Region\",\"backend\":\"Japan West\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + Central India Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"pn1prdapp01-canary.azr.footprintdns.com\",\"description\":\"Central + India Region\",\"backend\":\"Central India\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/preconfiguredendpoints\",\"name\":\"Azure + Southeast Asia Region\",\"type\":\"networkexperimentprofile/preconfiguredendpoints\",\"properties\":{\r\n + \ \"endpoint\":\"sg1prdapp02-canary.azr.footprintdns.com\",\"description\":\"Southeast + Asia Region\",\"backend\":\"Southeast Asia\",\"endpointType\":\"AzureRegion\"\r\n + \ }\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache @@ -1371,7 +760,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:41:04 GMT + - Fri, 28 May 2021 21:16:54 GMT expires: - '-1' odata-version: @@ -1379,7 +768,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1395,65 +784,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:41:04 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AgnILYSQkFpJq-5kkaOKyFc; expires=Wed, 04-Dec-2019 02:41:05 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7c_1NnKxGbpnOsBA8Eik6q9P1dbJV22ne2MdIW_Hkx_jemNgU84xpoy02G8JWUMmNmA8OQS6TdjSbi5Yzww0liqpebKxEzQ9nmMx4T-QK8MeS44ozcPkrlCIs64uo8hhzUQL4IwPW6Ku7Z96bVZQB3_xY6yX4kh3trfCFiIXRv7QgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -1468,22 +798,17 @@ interactions: ParameterSetName: - --resource-group --profile-name --test-name --aggregation-interval --end-date-time-utc User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/LatencyScorecard?api-version=2019-11-01&endDateTimeUTC=2019-09-21T17%3A32%3A28Z&aggregationInterval=Daily + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/LatencyScorecard?api-version=2019-11-01&endDateTimeUTC=2019-09-21T17%3A32%3A28Z&aggregationInterval=Daily response: body: - string: "{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment/latencyscorecard\"\ - ,\"name\":\"Latency scorecard for experiment 'MyExperiment' between 9/20/2019\ - \ 5:32:28 PM and 9/21/2019 5:32:28 PM.\",\"type\":\"networkexperiment/latencyscorecard\"\ - ,\"properties\":{\r\n \"description\":\"Latency scorecard for experiment\ - \ 'MyExperiment' between 9/20/2019 5:32:28 PM and 9/21/2019 5:32:28 PM.\"\ - ,\"endpointA\":\"endpointA.net\",\"endpointB\":\"endpointB.net\",\"startDateTimeUTC\"\ - :\"2019-09-20T17:32:28Z\",\"endDateTimeUTC\":\"2019-09-21T17:32:28Z\",\"country\"\ - :null,\"latencyMetrics\":[\r\n \r\n ]\r\n }\r\n}" + string: "{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment/latencyscorecard\",\"name\":\"Latency + scorecard for experiment 'MyExperiment' between 9/20/2019 5:32:28 PM and 9/21/2019 + 5:32:28 PM.\",\"type\":\"networkexperiment/latencyscorecard\",\"properties\":{\r\n + \ \"description\":\"Latency scorecard for experiment 'MyExperiment' between + 9/20/2019 5:32:28 PM and 9/21/2019 5:32:28 PM.\",\"endpointA\":\"endpointA.net\",\"endpointB\":\"endpointB.net\",\"startDateTimeUTC\":\"2019-09-20T17:32:28Z\",\"endDateTimeUTC\":\"2019-09-21T17:32:28Z\",\"country\":null,\"latencyMetrics\":[\r\n + \ \r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1492,7 +817,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:41:15 GMT + - Fri, 28 May 2021 21:17:00 GMT expires: - '-1' odata-version: @@ -1500,7 +825,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1516,65 +841,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:41:16 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AmKdYKppbXdPuGAT1EbbgmA; expires=Wed, 04-Dec-2019 02:41:16 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj75kAfO-G7t3gBAma-EVjHLnEdqRW-l807bFH34WCW6Pd-ZhSeIK1jXf2D6Ov7Yr3AY4T5HyNaqYPs3xFkNIQAdoBvNJJ_lAHOYwhQjo7XYnuIkNhpwnjJdrzHxd_vW1oXcpil4rTXyMAwoybETkSyR4-Ar520EXfqrla3qQqu6E0gAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -1590,20 +856,14 @@ interactions: - --resource-group --profile-name --test-name --aggregation-interval --start-date-time-utc --end-date-time-utc --timeseries-type --endpoint User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/Timeseries?api-version=2019-11-01&startDateTimeUTC=2019-07-21T17%3A32%3A28.000Z&endDateTimeUTC=2019-09-21T17%3A32%3A28.000Z&aggregationInterval=Hourly×eriesType=MeasurementCounts&endpoint=endpoint1.net + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment/Timeseries?api-version=2019-11-01&startDateTimeUTC=2019-07-21T17%3A32%3A28.000Z&endDateTimeUTC=2019-09-21T17%3A32%3A28.000Z&aggregationInterval=Hourly×eriesType=MeasurementCounts&endpoint=endpoint1.net response: body: - string: "{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment/timeseries\"\ - ,\"name\":null,\"type\":\"networkexperiment/timeseries\",\"properties\":{\r\ - \n \"endpoint\":\"endpoint1.net\",\"startDateTimeUTC\":\"2019-07-21T17:32:28Z\"\ - ,\"endDateTimeUTC\":\"2019-09-21T17:32:28Z\",\"aggregationInterval\":\"Hourly\"\ - ,\"timeseriesType\":\"CountsLatency\",\"country\":null,\"timeseriesData\"\ - :[\r\n \r\n ]\r\n }\r\n}" + string: "{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/networkexperimentprofiles/MyProfile/experiments/MyExperiment/timeseries\",\"name\":null,\"type\":\"networkexperiment/timeseries\",\"properties\":{\r\n + \ \"endpoint\":\"endpoint1.net\",\"startDateTimeUTC\":\"2019-07-21T17:32:28Z\",\"endDateTimeUTC\":\"2019-09-21T17:32:28Z\",\"aggregationInterval\":\"Hourly\",\"timeseriesType\":\"CountsLatency\",\"country\":null,\"timeseriesData\":[\r\n + \ \r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1612,7 +872,7 @@ interactions: content-type: - application/json; odata.metadata=minimal date: - - Mon, 04 Nov 2019 02:41:31 GMT + - Fri, 28 May 2021 21:17:07 GMT expires: - '-1' odata-version: @@ -1620,7 +880,7 @@ interactions: pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1636,65 +896,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:41:32 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=At61tSdZ75pFn-m_WuzftDI; expires=Wed, 04-Dec-2019 02:41:33 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7QW4sRsjsKzhHwlgtXzemGlE9lNLYgaAd-irDEXN_pTnzEMkBGS0kq7LO9SC2lifzqZoYV5igzKSa6fEKwVwa9-MEw1_3lm5rWybUKSgDTL0CxsYGiWANt5lGkGIt8pHZarPHhQOK9xkNitjz83VeCpWO4i_A4u4JkBxsl0e0CscgAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -1711,12 +912,9 @@ interactions: ParameterSetName: - --resource-group --profile-name --name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile/Experiments/MyExperiment?api-version=2019-11-01 response: body: string: '' @@ -1726,13 +924,13 @@ interactions: content-length: - '0' date: - - Mon, 04 Nov 2019 02:41:38 GMT + - Fri, 28 May 2021 21:17:14 GMT expires: - '-1' pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: @@ -1746,65 +944,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - linux - x-client-SKU: - - Python - x-client-Ver: - - 1.2.2 - method: GET - uri: https://login.windows.net/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - private, max-age=86400 - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 04 Nov 2019 02:41:39 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AsQuPmjnevNBrolFXpsbPpI; expires=Wed, 04-Dec-2019 02:41:39 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAACQN9QBRU3jT6bcBQLZNUj7Knbul6ztLlS34SXEyhyNPO-p3wyqxQHsgcxT8PrGzs9CM0tfVHgn12pFNCwwVR-5NJec9WndDgseyeGlU7L8wm-EzGcBOq8cLEWgMXxRehqoR5QrPw8SsQNKksfJ-2vRzgQxqKCIJXI38_8xmIZxN9N51WsBjszX_j7p5tit-m0gAA; - domain=.login.windows.net; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly - - stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.9645.6 - SIN1 ProdSlices - status: - code: 200 - message: OK - request: body: null headers: @@ -1821,12 +960,9 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-frontdoor/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.75 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_internet_analyzer000001/providers/Microsoft.Network/NetworkExperimentProfiles/MyProfile?api-version=2019-11-01 response: body: string: '' @@ -1836,13 +972,13 @@ interactions: content-length: - '0' date: - - Mon, 04 Nov 2019 02:41:44 GMT + - Fri, 28 May 2021 21:17:23 GMT expires: - '-1' pragma: - no-cache server: - - Microsoft-IIS/8.5 + - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/__init__.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/__init__.py index c1ad53652dd..4afc05f018d 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/__init__.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/__init__.py @@ -1,19 +1,19 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import FrontDoorManagementClientConfiguration from ._front_door_management_client import FrontDoorManagementClient -__all__ = ['FrontDoorManagementClient', 'FrontDoorManagementClientConfiguration'] - -from .version import VERSION +from ._version import VERSION __version__ = VERSION +__all__ = ['FrontDoorManagementClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_configuration.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_configuration.py index 826e21351d0..a57a16253db 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_configuration.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_configuration.py @@ -1,50 +1,70 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class FrontDoorManagementClientConfiguration(Configuration): + """Configuration for FrontDoorManagementClient. -class FrontDoorManagementClientConfiguration(AzureConfiguration): - """Configuration for FrontDoorManagementClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription credentials which uniquely - identify the Microsoft Azure subscription. The subscription ID forms part - of the URI for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(FrontDoorManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True + super(FrontDoorManagementClientConfiguration, self).__init__(**kwargs) - self.add_user_agent('azure-mgmt-frontdoor/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-frontdoor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_front_door_management_client.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_front_door_management_client.py index bcaf7660d09..2aad8ccc556 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_front_door_management_client.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_front_door_management_client.py @@ -1,91 +1,125 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential from ._configuration import FrontDoorManagementClientConfiguration -from .operations import FrontDoorManagementClientOperationsMixin from .operations import NetworkExperimentProfilesOperations from .operations import PreconfiguredEndpointsOperations from .operations import ExperimentsOperations from .operations import ReportsOperations +from .operations import FrontDoorNameAvailabilityOperations +from .operations import FrontDoorNameAvailabilityWithSubscriptionOperations from .operations import FrontDoorsOperations from .operations import FrontendEndpointsOperations from .operations import EndpointsOperations +from .operations import RulesEnginesOperations from .operations import PoliciesOperations from .operations import ManagedRuleSetsOperations from . import models -class FrontDoorManagementClient(FrontDoorManagementClientOperationsMixin, SDKClient): - """FrontDoor Client +class FrontDoorManagementClient(object): + """FrontDoor Client. - :ivar config: Configuration for client. - :vartype config: FrontDoorManagementClientConfiguration - - :ivar network_experiment_profiles: NetworkExperimentProfiles operations + :ivar network_experiment_profiles: NetworkExperimentProfilesOperations operations :vartype network_experiment_profiles: azure.mgmt.frontdoor.operations.NetworkExperimentProfilesOperations - :ivar preconfigured_endpoints: PreconfiguredEndpoints operations + :ivar preconfigured_endpoints: PreconfiguredEndpointsOperations operations :vartype preconfigured_endpoints: azure.mgmt.frontdoor.operations.PreconfiguredEndpointsOperations - :ivar experiments: Experiments operations + :ivar experiments: ExperimentsOperations operations :vartype experiments: azure.mgmt.frontdoor.operations.ExperimentsOperations - :ivar reports: Reports operations + :ivar reports: ReportsOperations operations :vartype reports: azure.mgmt.frontdoor.operations.ReportsOperations - :ivar front_doors: FrontDoors operations + :ivar front_door_name_availability: FrontDoorNameAvailabilityOperations operations + :vartype front_door_name_availability: azure.mgmt.frontdoor.operations.FrontDoorNameAvailabilityOperations + :ivar front_door_name_availability_with_subscription: FrontDoorNameAvailabilityWithSubscriptionOperations operations + :vartype front_door_name_availability_with_subscription: azure.mgmt.frontdoor.operations.FrontDoorNameAvailabilityWithSubscriptionOperations + :ivar front_doors: FrontDoorsOperations operations :vartype front_doors: azure.mgmt.frontdoor.operations.FrontDoorsOperations - :ivar frontend_endpoints: FrontendEndpoints operations + :ivar frontend_endpoints: FrontendEndpointsOperations operations :vartype frontend_endpoints: azure.mgmt.frontdoor.operations.FrontendEndpointsOperations - :ivar endpoints: Endpoints operations + :ivar endpoints: EndpointsOperations operations :vartype endpoints: azure.mgmt.frontdoor.operations.EndpointsOperations - :ivar policies: Policies operations + :ivar rules_engines: RulesEnginesOperations operations + :vartype rules_engines: azure.mgmt.frontdoor.operations.RulesEnginesOperations + :ivar policies: PoliciesOperations operations :vartype policies: azure.mgmt.frontdoor.operations.PoliciesOperations - :ivar managed_rule_sets: ManagedRuleSets operations + :ivar managed_rule_sets: ManagedRuleSetsOperations operations :vartype managed_rule_sets: azure.mgmt.frontdoor.operations.ManagedRuleSetsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription credentials which uniquely - identify the Microsoft Azure subscription. The subscription ID forms part - of the URI for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = FrontDoorManagementClientConfiguration(credentials, subscription_id, base_url) - super(FrontDoorManagementClient, self).__init__(self.config.credentials, self.config) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = FrontDoorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.network_experiment_profiles = NetworkExperimentProfilesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.preconfigured_endpoints = PreconfiguredEndpointsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.experiments = ExperimentsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.reports = ReportsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + self.front_door_name_availability = FrontDoorNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.front_door_name_availability_with_subscription = FrontDoorNameAvailabilityWithSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) self.front_doors = FrontDoorsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.frontend_endpoints = FrontendEndpointsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.endpoints = EndpointsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + self.rules_engines = RulesEnginesOperations( + self._client, self._config, self._serialize, self._deserialize) self.policies = PoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.managed_rule_sets = ManagedRuleSetsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> FrontDoorManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/version.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_version.py similarity index 84% rename from src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/version.py rename to src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_version.py index 3e682bbd5fb..c47f66669f1 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/version.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/_version.py @@ -1,13 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" - +VERSION = "1.0.0" diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/__init__.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/__init__.py new file mode 100644 index 00000000000..879639cbd88 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._front_door_management_client import FrontDoorManagementClient +__all__ = ['FrontDoorManagementClient'] diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_configuration.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_configuration.py new file mode 100644 index 00000000000..fa50fe396e7 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class FrontDoorManagementClientConfiguration(Configuration): + """Configuration for FrontDoorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(FrontDoorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-frontdoor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_front_door_management_client.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_front_door_management_client.py new file mode 100644 index 00000000000..a8f63c5a942 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/_front_door_management_client.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import FrontDoorManagementClientConfiguration +from .operations import NetworkExperimentProfilesOperations +from .operations import PreconfiguredEndpointsOperations +from .operations import ExperimentsOperations +from .operations import ReportsOperations +from .operations import FrontDoorNameAvailabilityOperations +from .operations import FrontDoorNameAvailabilityWithSubscriptionOperations +from .operations import FrontDoorsOperations +from .operations import FrontendEndpointsOperations +from .operations import EndpointsOperations +from .operations import RulesEnginesOperations +from .operations import PoliciesOperations +from .operations import ManagedRuleSetsOperations +from .. import models + + +class FrontDoorManagementClient(object): + """FrontDoor Client. + + :ivar network_experiment_profiles: NetworkExperimentProfilesOperations operations + :vartype network_experiment_profiles: azure.mgmt.frontdoor.aio.operations.NetworkExperimentProfilesOperations + :ivar preconfigured_endpoints: PreconfiguredEndpointsOperations operations + :vartype preconfigured_endpoints: azure.mgmt.frontdoor.aio.operations.PreconfiguredEndpointsOperations + :ivar experiments: ExperimentsOperations operations + :vartype experiments: azure.mgmt.frontdoor.aio.operations.ExperimentsOperations + :ivar reports: ReportsOperations operations + :vartype reports: azure.mgmt.frontdoor.aio.operations.ReportsOperations + :ivar front_door_name_availability: FrontDoorNameAvailabilityOperations operations + :vartype front_door_name_availability: azure.mgmt.frontdoor.aio.operations.FrontDoorNameAvailabilityOperations + :ivar front_door_name_availability_with_subscription: FrontDoorNameAvailabilityWithSubscriptionOperations operations + :vartype front_door_name_availability_with_subscription: azure.mgmt.frontdoor.aio.operations.FrontDoorNameAvailabilityWithSubscriptionOperations + :ivar front_doors: FrontDoorsOperations operations + :vartype front_doors: azure.mgmt.frontdoor.aio.operations.FrontDoorsOperations + :ivar frontend_endpoints: FrontendEndpointsOperations operations + :vartype frontend_endpoints: azure.mgmt.frontdoor.aio.operations.FrontendEndpointsOperations + :ivar endpoints: EndpointsOperations operations + :vartype endpoints: azure.mgmt.frontdoor.aio.operations.EndpointsOperations + :ivar rules_engines: RulesEnginesOperations operations + :vartype rules_engines: azure.mgmt.frontdoor.aio.operations.RulesEnginesOperations + :ivar policies: PoliciesOperations operations + :vartype policies: azure.mgmt.frontdoor.aio.operations.PoliciesOperations + :ivar managed_rule_sets: ManagedRuleSetsOperations operations + :vartype managed_rule_sets: azure.mgmt.frontdoor.aio.operations.ManagedRuleSetsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = FrontDoorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.network_experiment_profiles = NetworkExperimentProfilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.preconfigured_endpoints = PreconfiguredEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.experiments = ExperimentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.reports = ReportsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.front_door_name_availability = FrontDoorNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.front_door_name_availability_with_subscription = FrontDoorNameAvailabilityWithSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.front_doors = FrontDoorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.frontend_endpoints = FrontendEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.endpoints = EndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.rules_engines = RulesEnginesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.policies = PoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_rule_sets = ManagedRuleSetsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "FrontDoorManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/__init__.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/__init__.py new file mode 100644 index 00000000000..e7a8086b356 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_experiment_profiles_operations import NetworkExperimentProfilesOperations +from ._preconfigured_endpoints_operations import PreconfiguredEndpointsOperations +from ._experiments_operations import ExperimentsOperations +from ._reports_operations import ReportsOperations +from ._front_door_name_availability_operations import FrontDoorNameAvailabilityOperations +from ._front_door_name_availability_with_subscription_operations import FrontDoorNameAvailabilityWithSubscriptionOperations +from ._front_doors_operations import FrontDoorsOperations +from ._frontend_endpoints_operations import FrontendEndpointsOperations +from ._endpoints_operations import EndpointsOperations +from ._rules_engines_operations import RulesEnginesOperations +from ._policies_operations import PoliciesOperations +from ._managed_rule_sets_operations import ManagedRuleSetsOperations + +__all__ = [ + 'NetworkExperimentProfilesOperations', + 'PreconfiguredEndpointsOperations', + 'ExperimentsOperations', + 'ReportsOperations', + 'FrontDoorNameAvailabilityOperations', + 'FrontDoorNameAvailabilityWithSubscriptionOperations', + 'FrontDoorsOperations', + 'FrontendEndpointsOperations', + 'EndpointsOperations', + 'RulesEnginesOperations', + 'PoliciesOperations', + 'ManagedRuleSetsOperations', +] diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_endpoints_operations.py new file mode 100644 index 00000000000..33e2e524203 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_endpoints_operations.py @@ -0,0 +1,164 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EndpointsOperations: + """EndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _purge_content_initial( + self, + resource_group_name: str, + front_door_name: str, + content_file_paths: "_models.PurgeParameters", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._purge_content_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(content_file_paths, 'PurgeParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_content_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge'} # type: ignore + + async def begin_purge_content( + self, + resource_group_name: str, + front_door_name: str, + content_file_paths: "_models.PurgeParameters", + **kwargs + ) -> AsyncLROPoller[None]: + """Removes a content from Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. + :type content_file_paths: ~azure.mgmt.frontdoor.models.PurgeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._purge_content_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + content_file_paths=content_file_paths, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_experiments_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_experiments_operations.py new file mode 100644 index 00000000000..8a1ff2ad924 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_experiments_operations.py @@ -0,0 +1,583 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExperimentsOperations: + """ExperimentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_profile( + self, + resource_group_name: str, + profile_name: str, + **kwargs + ) -> AsyncIterable["_models.ExperimentList"]: + """Gets a list of Experiments. + + Gets a list of Experiments. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.ExperimentList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments'} # type: ignore + + async def get( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + **kwargs + ) -> "_models.Experiment": + """Gets an Experiment by ExperimentName. + + Gets an Experiment by ExperimentName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Experiment, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Experiment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + parameters: "_models.Experiment", + **kwargs + ) -> "_models.Experiment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Experiment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Experiment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Experiment', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + parameters: "_models.Experiment", + **kwargs + ) -> AsyncLROPoller["_models.Experiment"]: + """Creates or updates an Experiment. + + Creates or updates an Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :param parameters: The Experiment resource. + :type parameters: ~azure.mgmt.frontdoor.models.Experiment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + parameters: "_models.ExperimentUpdateModel", + **kwargs + ) -> "_models.Experiment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ExperimentUpdateModel') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Experiment', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + parameters: "_models.ExperimentUpdateModel", + **kwargs + ) -> AsyncLROPoller["_models.Experiment"]: + """Updates an Experiment by Experiment id. + + Updates an Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :param parameters: The Experiment Update Model. + :type parameters: ~azure.mgmt.frontdoor.models.ExperimentUpdateModel + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes an Experiment. + + Deletes an Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_operations.py new file mode 100644 index 00000000000..1adeeddb5b9 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FrontDoorNameAvailabilityOperations: + """FrontDoorNameAvailabilityOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check( + self, + check_front_door_name_availability_input: "_models.CheckNameAvailabilityInput", + **kwargs + ) -> "_models.CheckNameAvailabilityOutput": + """Check the availability of a Front Door resource name. + + :param check_front_door_name_availability_input: Input to check. + :type check_front_door_name_availability_input: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(check_front_door_name_availability_input, 'CheckNameAvailabilityInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check.metadata = {'url': '/providers/Microsoft.Network/checkFrontDoorNameAvailability'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_with_subscription_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_with_subscription_operations.py new file mode 100644 index 00000000000..e72ded6a7d4 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_door_name_availability_with_subscription_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FrontDoorNameAvailabilityWithSubscriptionOperations: + """FrontDoorNameAvailabilityWithSubscriptionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check( + self, + check_front_door_name_availability_input: "_models.CheckNameAvailabilityInput", + **kwargs + ) -> "_models.CheckNameAvailabilityOutput": + """Check the availability of a Front Door subdomain. + + :param check_front_door_name_availability_input: Input to check. + :type check_front_door_name_availability_input: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(check_front_door_name_availability_input, 'CheckNameAvailabilityInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_doors_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_doors_operations.py new file mode 100644 index 00000000000..bc689522216 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_front_doors_operations.py @@ -0,0 +1,552 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FrontDoorsOperations: + """FrontDoorsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.FrontDoorListResult"]: + """Lists all of the Front Doors within an Azure subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontDoorListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.FrontDoorListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FrontDoorListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.FrontDoorListResult"]: + """Lists all of the Front Doors within a resource group under a subscription. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontDoorListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.FrontDoorListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FrontDoorListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors'} # type: ignore + + async def get( + self, + resource_group_name: str, + front_door_name: str, + **kwargs + ) -> "_models.FrontDoor": + """Gets a Front Door with the specified Front Door name under the specified subscription and + resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontDoor, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.FrontDoor + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + front_door_name: str, + front_door_parameters: "_models.FrontDoor", + **kwargs + ) -> "_models.FrontDoor": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(front_door_parameters, 'FrontDoor') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + front_door_name: str, + front_door_parameters: "_models.FrontDoor", + **kwargs + ) -> AsyncLROPoller["_models.FrontDoor"]: + """Creates a new Front Door with a Front Door name under the specified subscription and resource + group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param front_door_parameters: Front Door properties needed to create a new Front Door. + :type front_door_parameters: ~azure.mgmt.frontdoor.models.FrontDoor + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FrontDoor or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.FrontDoor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + front_door_parameters=front_door_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + front_door_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + front_door_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes an existing Front Door with the specified parameters. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + async def validate_custom_domain( + self, + resource_group_name: str, + front_door_name: str, + custom_domain_properties: "_models.ValidateCustomDomainInput", + **kwargs + ) -> "_models.ValidateCustomDomainOutput": + """Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in + DNS. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param custom_domain_properties: Custom domain to be validated. + :type custom_domain_properties: ~azure.mgmt.frontdoor.models.ValidateCustomDomainInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateCustomDomainOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.ValidateCustomDomainOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateCustomDomainOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_custom_domain.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(custom_domain_properties, 'ValidateCustomDomainInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_frontend_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_frontend_endpoints_operations.py new file mode 100644 index 00000000000..c337c814d3d --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_frontend_endpoints_operations.py @@ -0,0 +1,427 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FrontendEndpointsOperations: + """FrontendEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_front_door( + self, + resource_group_name: str, + front_door_name: str, + **kwargs + ) -> AsyncIterable["_models.FrontendEndpointsListResult"]: + """Lists all of the frontend endpoints within a Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontendEndpointsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.FrontendEndpointsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendEndpointsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_front_door.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FrontendEndpointsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints'} # type: ignore + + async def get( + self, + resource_group_name: str, + front_door_name: str, + frontend_endpoint_name: str, + **kwargs + ) -> "_models.FrontendEndpoint": + """Gets a Frontend endpoint with the specified name within the specified Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. + :type frontend_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontendEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.FrontendEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FrontendEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} # type: ignore + + async def _enable_https_initial( + self, + resource_group_name: str, + front_door_name: str, + frontend_endpoint_name: str, + custom_https_configuration: "_models.CustomHttpsConfiguration", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._enable_https_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(custom_https_configuration, 'CustomHttpsConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _enable_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps'} # type: ignore + + async def begin_enable_https( + self, + resource_group_name: str, + front_door_name: str, + frontend_endpoint_name: str, + custom_https_configuration: "_models.CustomHttpsConfiguration", + **kwargs + ) -> AsyncLROPoller[None]: + """Enables a frontendEndpoint for HTTPS traffic. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. + :type frontend_endpoint_name: str + :param custom_https_configuration: The configuration specifying how to enable HTTPS. + :type custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._enable_https_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + frontend_endpoint_name=frontend_endpoint_name, + custom_https_configuration=custom_https_configuration, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_enable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps'} # type: ignore + + async def _disable_https_initial( + self, + resource_group_name: str, + front_door_name: str, + frontend_endpoint_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self._disable_https_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disable_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps'} # type: ignore + + async def begin_disable_https( + self, + resource_group_name: str, + front_door_name: str, + frontend_endpoint_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Disables a frontendEndpoint for HTTPS traffic. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. + :type frontend_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._disable_https_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + frontend_endpoint_name=frontend_endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_managed_rule_sets_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_managed_rule_sets_operations.py new file mode 100644 index 00000000000..d682ff45f78 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_managed_rule_sets_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedRuleSetsOperations: + """ManagedRuleSetsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.ManagedRuleSetDefinitionList"]: + """Lists all available managed rule sets. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedRuleSetDefinitionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinitionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedRuleSetDefinitionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedRuleSetDefinitionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_network_experiment_profiles_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_network_experiment_profiles_operations.py new file mode 100644 index 00000000000..ea3bea371bd --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_network_experiment_profiles_operations.py @@ -0,0 +1,623 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkExperimentProfilesOperations: + """NetworkExperimentProfilesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.ProfileList"]: + """Gets a list of Network Experiment Profiles under a subscription. + + Gets a list of Network Experiment Profiles under a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProfileList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.ProfileList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProfileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProfileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.ProfileList"]: + """Gets a list of Network Experiment Profiles within a resource group under a subscription. + + Gets a list of Network Experiment Profiles within a resource group under a subscription. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProfileList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.ProfileList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProfileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProfileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles'} # type: ignore + + async def get( + self, + resource_group_name: str, + profile_name: str, + **kwargs + ) -> "_models.Profile": + """Gets an NetworkExperiment Profile by ProfileName. + + Gets an NetworkExperiment Profile by ProfileName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Profile, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Profile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def _create_or_update_initial( + self, + profile_name: str, + resource_group_name: str, + parameters: "_models.Profile", + **kwargs + ) -> "_models.Profile": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Profile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Profile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Profile', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def begin_create_or_update( + self, + profile_name: str, + resource_group_name: str, + parameters: "_models.Profile", + **kwargs + ) -> AsyncLROPoller["_models.Profile"]: + """Creates an NetworkExperiment Profile. + + Creates an NetworkExperiment Profile. + + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param parameters: An Network Experiment Profile. + :type parameters: ~azure.mgmt.frontdoor.models.Profile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Profile or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + profile_name=profile_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + parameters: "_models.ProfileUpdateModel", + **kwargs + ) -> "_models.Profile": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProfileUpdateModel') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Profile', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + parameters: "_models.ProfileUpdateModel", + **kwargs + ) -> AsyncLROPoller["_models.Profile"]: + """Updates an NetworkExperimentProfiles by NetworkExperimentProfile name. + + Updates an NetworkExperimentProfiles. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param parameters: The Profile Update Model. + :type parameters: ~azure.mgmt.frontdoor.models.ProfileUpdateModel + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Profile or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + profile_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + profile_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes an NetworkExperiment Profile by ProfileName. + + Deletes an NetworkExperiment Profile by ProfileName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_policies_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_policies_operations.py new file mode 100644 index 00000000000..0d3644f7298 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_policies_operations.py @@ -0,0 +1,412 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PoliciesOperations: + """PoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.WebApplicationFirewallPolicyList"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicyList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies'} # type: ignore + + async def get( + self, + resource_group_name: str, + policy_name: str, + **kwargs + ) -> "_models.WebApplicationFirewallPolicy": + """Retrieve protection policy with specified name within a resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param policy_name: The name of the Web Application Firewall Policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + policy_name: str, + parameters: "_models.WebApplicationFirewallPolicy", + **kwargs + ) -> "_models.WebApplicationFirewallPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + parameters: "_models.WebApplicationFirewallPolicy", + **kwargs + ) -> AsyncLROPoller["_models.WebApplicationFirewallPolicy"]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param policy_name: The name of the Web Application Firewall Policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either WebApplicationFirewallPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + policy_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + policy_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes Policy. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param policy_name: The name of the Web Application Firewall Policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_preconfigured_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_preconfigured_endpoints_operations.py new file mode 100644 index 00000000000..365e002a207 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_preconfigured_endpoints_operations.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PreconfiguredEndpointsOperations: + """PreconfiguredEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + profile_name: str, + **kwargs + ) -> AsyncIterable["_models.PreconfiguredEndpointList"]: + """Gets a list of Preconfigured Endpoints. + + Gets a list of Preconfigured Endpoints. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PreconfiguredEndpointList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.PreconfiguredEndpointList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PreconfiguredEndpointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PreconfiguredEndpointList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/PreconfiguredEndpoints'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_reports_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_reports_operations.py new file mode 100644 index 00000000000..fa4398afee3 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_reports_operations.py @@ -0,0 +1,214 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ReportsOperations: + """ReportsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_latency_scorecards( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + aggregation_interval: Union[str, "_models.LatencyScorecardAggregationInterval"], + end_date_time_utc: Optional[str] = None, + country: Optional[str] = None, + **kwargs + ) -> "_models.LatencyScorecard": + """Gets a Latency Scorecard for a given Experiment. + + Gets a Latency Scorecard for a given Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :param aggregation_interval: The aggregation interval of the Latency Scorecard. + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.LatencyScorecardAggregationInterval + :param end_date_time_utc: The end DateTime of the Latency Scorecard in UTC. + :type end_date_time_utc: str + :param country: The country associated with the Latency Scorecard. Values are country ISO codes + as specified here- https://www.iso.org/iso-3166-country-codes.html. + :type country: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LatencyScorecard, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.LatencyScorecard + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LatencyScorecard"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self.get_latency_scorecards.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if end_date_time_utc is not None: + query_parameters['endDateTimeUTC'] = self._serialize.query("end_date_time_utc", end_date_time_utc, 'str') + if country is not None: + query_parameters['country'] = self._serialize.query("country", country, 'str') + query_parameters['aggregationInterval'] = self._serialize.query("aggregation_interval", aggregation_interval, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LatencyScorecard', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_latency_scorecards.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/LatencyScorecard'} # type: ignore + + async def get_timeseries( + self, + resource_group_name: str, + profile_name: str, + experiment_name: str, + start_date_time_utc: datetime.datetime, + end_date_time_utc: datetime.datetime, + aggregation_interval: Union[str, "_models.TimeseriesAggregationInterval"], + timeseries_type: Union[str, "_models.TimeseriesType"], + endpoint: Optional[str] = None, + country: Optional[str] = None, + **kwargs + ) -> "_models.Timeseries": + """Gets a Timeseries for a given Experiment. + + Gets a Timeseries for a given Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: The Profile identifier associated with the Tenant and Partner. + :type profile_name: str + :param experiment_name: The Experiment identifier associated with the Experiment. + :type experiment_name: str + :param start_date_time_utc: The start DateTime of the Timeseries in UTC. + :type start_date_time_utc: ~datetime.datetime + :param end_date_time_utc: The end DateTime of the Timeseries in UTC. + :type end_date_time_utc: ~datetime.datetime + :param aggregation_interval: The aggregation interval of the Timeseries. + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.TimeseriesAggregationInterval + :param timeseries_type: The type of Timeseries. + :type timeseries_type: str or ~azure.mgmt.frontdoor.models.TimeseriesType + :param endpoint: The specific endpoint. + :type endpoint: str + :param country: The country associated with the Timeseries. Values are country ISO codes as + specified here- https://www.iso.org/iso-3166-country-codes.html. + :type country: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Timeseries, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Timeseries + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Timeseries"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + + # Construct URL + url = self.get_timeseries.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['startDateTimeUTC'] = self._serialize.query("start_date_time_utc", start_date_time_utc, 'iso-8601') + query_parameters['endDateTimeUTC'] = self._serialize.query("end_date_time_utc", end_date_time_utc, 'iso-8601') + query_parameters['aggregationInterval'] = self._serialize.query("aggregation_interval", aggregation_interval, 'str') + query_parameters['timeseriesType'] = self._serialize.query("timeseries_type", timeseries_type, 'str') + if endpoint is not None: + query_parameters['endpoint'] = self._serialize.query("endpoint", endpoint, 'str') + if country is not None: + query_parameters['country'] = self._serialize.query("country", country, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Timeseries', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_timeseries.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/Timeseries'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_rules_engines_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_rules_engines_operations.py new file mode 100644 index 00000000000..3718b619f23 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/aio/operations/_rules_engines_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RulesEnginesOperations: + """RulesEnginesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_front_door( + self, + resource_group_name: str, + front_door_name: str, + **kwargs + ) -> AsyncIterable["_models.RulesEngineListResult"]: + """Lists all of the Rules Engine Configurations within a Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RulesEngineListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.frontdoor.models.RulesEngineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_front_door.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RulesEngineListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines'} # type: ignore + + async def get( + self, + resource_group_name: str, + front_door_name: str, + rules_engine_name: str, + **kwargs + ) -> "_models.RulesEngine": + """Gets a Rules Engine Configuration with the specified name within the specified Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RulesEngine, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.RulesEngine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + front_door_name: str, + rules_engine_name: str, + rules_engine_parameters: "_models.RulesEngine", + **kwargs + ) -> "_models.RulesEngine": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rules_engine_parameters, 'RulesEngine') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + front_door_name: str, + rules_engine_name: str, + rules_engine_parameters: "_models.RulesEngine", + **kwargs + ) -> AsyncLROPoller["_models.RulesEngine"]: + """Creates a new Rules Engine Configuration with the specified name within the specified Front + Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :param rules_engine_parameters: Rules Engine Configuration properties needed to create a new + Rules Engine Configuration. + :type rules_engine_parameters: ~azure.mgmt.frontdoor.models.RulesEngine + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RulesEngine or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.frontdoor.models.RulesEngine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + rules_engine_name=rules_engine_name, + rules_engine_parameters=rules_engine_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + front_door_name: str, + rules_engine_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + front_door_name: str, + rules_engine_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes an existing Rules Engine Configuration with the specified parameters. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + rules_engine_name=rules_engine_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/__init__.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/__init__.py index 1fc048f731e..8b3787e077a 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/__init__.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: @@ -14,8 +11,9 @@ from ._models_py3 import Backend from ._models_py3 import BackendPool from ._models_py3 import BackendPoolListResult - from ._models_py3 import BackendPoolsSettings + from ._models_py3 import BackendPoolProperties from ._models_py3 import BackendPoolUpdateParameters + from ._models_py3 import BackendPoolsSettings from ._models_py3 import CacheConfiguration from ._models_py3 import CheckNameAvailabilityInput from ._models_py3 import CheckNameAvailabilityOutput @@ -25,24 +23,32 @@ from ._models_py3 import Endpoint from ._models_py3 import Error from ._models_py3 import ErrorDetails - from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse from ._models_py3 import Experiment + from ._models_py3 import ExperimentList from ._models_py3 import ExperimentUpdateModel from ._models_py3 import ForwardingConfiguration from ._models_py3 import FrontDoor + from ._models_py3 import FrontDoorListResult + from ._models_py3 import FrontDoorProperties from ._models_py3 import FrontDoorUpdateParameters from ._models_py3 import FrontendEndpoint from ._models_py3 import FrontendEndpointLink + from ._models_py3 import FrontendEndpointProperties from ._models_py3 import FrontendEndpointUpdateParameters from ._models_py3 import FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink + from ._models_py3 import FrontendEndpointsListResult + from ._models_py3 import HeaderAction from ._models_py3 import HealthProbeSettingsListResult from ._models_py3 import HealthProbeSettingsModel + from ._models_py3 import HealthProbeSettingsProperties from ._models_py3 import HealthProbeSettingsUpdateParameters from ._models_py3 import KeyVaultCertificateSourceParametersVault from ._models_py3 import LatencyMetric from ._models_py3 import LatencyScorecard from ._models_py3 import LoadBalancingSettingsListResult from ._models_py3 import LoadBalancingSettingsModel + from ._models_py3 import LoadBalancingSettingsProperties from ._models_py3 import LoadBalancingSettingsUpdateParameters from ._models_py3 import ManagedRuleDefinition from ._models_py3 import ManagedRuleExclusion @@ -51,19 +57,34 @@ from ._models_py3 import ManagedRuleOverride from ._models_py3 import ManagedRuleSet from ._models_py3 import ManagedRuleSetDefinition + from ._models_py3 import ManagedRuleSetDefinitionList from ._models_py3 import ManagedRuleSetList from ._models_py3 import MatchCondition from ._models_py3 import PolicySettings from ._models_py3 import PreconfiguredEndpoint + from ._models_py3 import PreconfiguredEndpointList from ._models_py3 import Profile + from ._models_py3 import ProfileList from ._models_py3 import ProfileUpdateModel from ._models_py3 import PurgeParameters from ._models_py3 import RedirectConfiguration from ._models_py3 import Resource from ._models_py3 import RouteConfiguration from ._models_py3 import RoutingRule + from ._models_py3 import RoutingRuleLink from ._models_py3 import RoutingRuleListResult + from ._models_py3 import RoutingRuleProperties from ._models_py3 import RoutingRuleUpdateParameters + from ._models_py3 import RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + from ._models_py3 import RulesEngine + from ._models_py3 import RulesEngineAction + from ._models_py3 import RulesEngineListResult + from ._models_py3 import RulesEngineMatchCondition + from ._models_py3 import RulesEngineProperties + from ._models_py3 import RulesEngineRule + from ._models_py3 import RulesEngineUpdateParameters + from ._models_py3 import SecurityPolicyLink + from ._models_py3 import Sku from ._models_py3 import SubResource from ._models_py3 import TagsObject from ._models_py3 import Timeseries @@ -71,117 +92,147 @@ from ._models_py3 import ValidateCustomDomainInput from ._models_py3 import ValidateCustomDomainOutput from ._models_py3 import WebApplicationFirewallPolicy + from ._models_py3 import WebApplicationFirewallPolicyList except (SyntaxError, ImportError): - from ._models import AzureAsyncOperationResult - from ._models import Backend - from ._models import BackendPool - from ._models import BackendPoolListResult - from ._models import BackendPoolsSettings - from ._models import BackendPoolUpdateParameters - from ._models import CacheConfiguration - from ._models import CheckNameAvailabilityInput - from ._models import CheckNameAvailabilityOutput - from ._models import CustomHttpsConfiguration - from ._models import CustomRule - from ._models import CustomRuleList - from ._models import Endpoint - from ._models import Error - from ._models import ErrorDetails - from ._models import ErrorResponse, ErrorResponseException - from ._models import Experiment - from ._models import ExperimentUpdateModel - from ._models import ForwardingConfiguration - from ._models import FrontDoor - from ._models import FrontDoorUpdateParameters - from ._models import FrontendEndpoint - from ._models import FrontendEndpointLink - from ._models import FrontendEndpointUpdateParameters - from ._models import FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink - from ._models import HealthProbeSettingsListResult - from ._models import HealthProbeSettingsModel - from ._models import HealthProbeSettingsUpdateParameters - from ._models import KeyVaultCertificateSourceParametersVault - from ._models import LatencyMetric - from ._models import LatencyScorecard - from ._models import LoadBalancingSettingsListResult - from ._models import LoadBalancingSettingsModel - from ._models import LoadBalancingSettingsUpdateParameters - from ._models import ManagedRuleDefinition - from ._models import ManagedRuleExclusion - from ._models import ManagedRuleGroupDefinition - from ._models import ManagedRuleGroupOverride - from ._models import ManagedRuleOverride - from ._models import ManagedRuleSet - from ._models import ManagedRuleSetDefinition - from ._models import ManagedRuleSetList - from ._models import MatchCondition - from ._models import PolicySettings - from ._models import PreconfiguredEndpoint - from ._models import Profile - from ._models import ProfileUpdateModel - from ._models import PurgeParameters - from ._models import RedirectConfiguration - from ._models import Resource - from ._models import RouteConfiguration - from ._models import RoutingRule - from ._models import RoutingRuleListResult - from ._models import RoutingRuleUpdateParameters - from ._models import SubResource - from ._models import TagsObject - from ._models import Timeseries - from ._models import TimeseriesDataPoint - from ._models import ValidateCustomDomainInput - from ._models import ValidateCustomDomainOutput - from ._models import WebApplicationFirewallPolicy -from ._paged_models import ExperimentPaged -from ._paged_models import FrontDoorPaged -from ._paged_models import FrontendEndpointPaged -from ._paged_models import ManagedRuleSetDefinitionPaged -from ._paged_models import PreconfiguredEndpointPaged -from ._paged_models import ProfilePaged -from ._paged_models import WebApplicationFirewallPolicyPaged + from ._models import AzureAsyncOperationResult # type: ignore + from ._models import Backend # type: ignore + from ._models import BackendPool # type: ignore + from ._models import BackendPoolListResult # type: ignore + from ._models import BackendPoolProperties # type: ignore + from ._models import BackendPoolUpdateParameters # type: ignore + from ._models import BackendPoolsSettings # type: ignore + from ._models import CacheConfiguration # type: ignore + from ._models import CheckNameAvailabilityInput # type: ignore + from ._models import CheckNameAvailabilityOutput # type: ignore + from ._models import CustomHttpsConfiguration # type: ignore + from ._models import CustomRule # type: ignore + from ._models import CustomRuleList # type: ignore + from ._models import Endpoint # type: ignore + from ._models import Error # type: ignore + from ._models import ErrorDetails # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import Experiment # type: ignore + from ._models import ExperimentList # type: ignore + from ._models import ExperimentUpdateModel # type: ignore + from ._models import ForwardingConfiguration # type: ignore + from ._models import FrontDoor # type: ignore + from ._models import FrontDoorListResult # type: ignore + from ._models import FrontDoorProperties # type: ignore + from ._models import FrontDoorUpdateParameters # type: ignore + from ._models import FrontendEndpoint # type: ignore + from ._models import FrontendEndpointLink # type: ignore + from ._models import FrontendEndpointProperties # type: ignore + from ._models import FrontendEndpointUpdateParameters # type: ignore + from ._models import FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink # type: ignore + from ._models import FrontendEndpointsListResult # type: ignore + from ._models import HeaderAction # type: ignore + from ._models import HealthProbeSettingsListResult # type: ignore + from ._models import HealthProbeSettingsModel # type: ignore + from ._models import HealthProbeSettingsProperties # type: ignore + from ._models import HealthProbeSettingsUpdateParameters # type: ignore + from ._models import KeyVaultCertificateSourceParametersVault # type: ignore + from ._models import LatencyMetric # type: ignore + from ._models import LatencyScorecard # type: ignore + from ._models import LoadBalancingSettingsListResult # type: ignore + from ._models import LoadBalancingSettingsModel # type: ignore + from ._models import LoadBalancingSettingsProperties # type: ignore + from ._models import LoadBalancingSettingsUpdateParameters # type: ignore + from ._models import ManagedRuleDefinition # type: ignore + from ._models import ManagedRuleExclusion # type: ignore + from ._models import ManagedRuleGroupDefinition # type: ignore + from ._models import ManagedRuleGroupOverride # type: ignore + from ._models import ManagedRuleOverride # type: ignore + from ._models import ManagedRuleSet # type: ignore + from ._models import ManagedRuleSetDefinition # type: ignore + from ._models import ManagedRuleSetDefinitionList # type: ignore + from ._models import ManagedRuleSetList # type: ignore + from ._models import MatchCondition # type: ignore + from ._models import PolicySettings # type: ignore + from ._models import PreconfiguredEndpoint # type: ignore + from ._models import PreconfiguredEndpointList # type: ignore + from ._models import Profile # type: ignore + from ._models import ProfileList # type: ignore + from ._models import ProfileUpdateModel # type: ignore + from ._models import PurgeParameters # type: ignore + from ._models import RedirectConfiguration # type: ignore + from ._models import Resource # type: ignore + from ._models import RouteConfiguration # type: ignore + from ._models import RoutingRule # type: ignore + from ._models import RoutingRuleLink # type: ignore + from ._models import RoutingRuleListResult # type: ignore + from ._models import RoutingRuleProperties # type: ignore + from ._models import RoutingRuleUpdateParameters # type: ignore + from ._models import RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink # type: ignore + from ._models import RulesEngine # type: ignore + from ._models import RulesEngineAction # type: ignore + from ._models import RulesEngineListResult # type: ignore + from ._models import RulesEngineMatchCondition # type: ignore + from ._models import RulesEngineProperties # type: ignore + from ._models import RulesEngineRule # type: ignore + from ._models import RulesEngineUpdateParameters # type: ignore + from ._models import SecurityPolicyLink # type: ignore + from ._models import Sku # type: ignore + from ._models import SubResource # type: ignore + from ._models import TagsObject # type: ignore + from ._models import Timeseries # type: ignore + from ._models import TimeseriesDataPoint # type: ignore + from ._models import ValidateCustomDomainInput # type: ignore + from ._models import ValidateCustomDomainOutput # type: ignore + from ._models import WebApplicationFirewallPolicy # type: ignore + from ._models import WebApplicationFirewallPolicyList # type: ignore + from ._front_door_management_client_enums import ( - NetworkOperationStatus, - NetworkExperimentResourceState, - State, + ActionType, AggregationInterval, - TimeseriesType, - EndpointType, - FrontDoorResourceState, + Availability, + BackendEnabledState, CustomHttpsProvisioningState, CustomHttpsProvisioningSubstate, + CustomRuleEnabledState, + DynamicCompressionEnabled, + EndpointType, + EnforceCertificateNameCheckEnabledState, FrontDoorCertificateSource, - MinimumTLSVersion, FrontDoorCertificateType, - EnforceCertificateNameCheckEnabledState, FrontDoorEnabledState, - FrontDoorProtocol, - RoutingRuleEnabledState, FrontDoorForwardingProtocol, + FrontDoorHealthProbeMethod, + FrontDoorProtocol, FrontDoorQuery, - DynamicCompressionEnabled, - FrontDoorRedirectType, FrontDoorRedirectProtocol, - BackendEnabledState, - FrontDoorHealthProbeMethod, + FrontDoorRedirectType, + FrontDoorResourceState, + FrontDoorTlsProtocolType, + HeaderActionType, HealthProbeEnabled, - SessionAffinityEnabledState, - ResourceType, - Availability, - PolicyEnabledState, - PolicyMode, - CustomRuleEnabledState, - RuleType, - MatchVariable, - Operator, - TransformType, - ActionType, + LatencyScorecardAggregationInterval, + ManagedRuleEnabledState, ManagedRuleExclusionMatchVariable, ManagedRuleExclusionSelectorMatchOperator, - ManagedRuleEnabledState, + ManagedRuleSetActionType, + MatchProcessingBehavior, + MatchVariable, + MinimumTLSVersion, + NetworkExperimentResourceState, + NetworkOperationStatus, + Operator, + PolicyEnabledState, + PolicyMode, + PolicyRequestBodyCheck, PolicyResourceState, - LatencyScorecardAggregationInterval, + PrivateEndpointStatus, + ResourceType, + RoutingRuleEnabledState, + RuleType, + RulesEngineMatchVariable, + RulesEngineOperator, + SessionAffinityEnabledState, + SkuName, + State, TimeseriesAggregationInterval, + TimeseriesType, + Transform, + TransformType, ) __all__ = [ @@ -189,8 +240,9 @@ 'Backend', 'BackendPool', 'BackendPoolListResult', - 'BackendPoolsSettings', + 'BackendPoolProperties', 'BackendPoolUpdateParameters', + 'BackendPoolsSettings', 'CacheConfiguration', 'CheckNameAvailabilityInput', 'CheckNameAvailabilityOutput', @@ -200,24 +252,32 @@ 'Endpoint', 'Error', 'ErrorDetails', - 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse', 'Experiment', + 'ExperimentList', 'ExperimentUpdateModel', 'ForwardingConfiguration', 'FrontDoor', + 'FrontDoorListResult', + 'FrontDoorProperties', 'FrontDoorUpdateParameters', 'FrontendEndpoint', 'FrontendEndpointLink', + 'FrontendEndpointProperties', 'FrontendEndpointUpdateParameters', 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink', + 'FrontendEndpointsListResult', + 'HeaderAction', 'HealthProbeSettingsListResult', 'HealthProbeSettingsModel', + 'HealthProbeSettingsProperties', 'HealthProbeSettingsUpdateParameters', 'KeyVaultCertificateSourceParametersVault', 'LatencyMetric', 'LatencyScorecard', 'LoadBalancingSettingsListResult', 'LoadBalancingSettingsModel', + 'LoadBalancingSettingsProperties', 'LoadBalancingSettingsUpdateParameters', 'ManagedRuleDefinition', 'ManagedRuleExclusion', @@ -226,19 +286,34 @@ 'ManagedRuleOverride', 'ManagedRuleSet', 'ManagedRuleSetDefinition', + 'ManagedRuleSetDefinitionList', 'ManagedRuleSetList', 'MatchCondition', 'PolicySettings', 'PreconfiguredEndpoint', + 'PreconfiguredEndpointList', 'Profile', + 'ProfileList', 'ProfileUpdateModel', 'PurgeParameters', 'RedirectConfiguration', 'Resource', 'RouteConfiguration', 'RoutingRule', + 'RoutingRuleLink', 'RoutingRuleListResult', + 'RoutingRuleProperties', 'RoutingRuleUpdateParameters', + 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink', + 'RulesEngine', + 'RulesEngineAction', + 'RulesEngineListResult', + 'RulesEngineMatchCondition', + 'RulesEngineProperties', + 'RulesEngineRule', + 'RulesEngineUpdateParameters', + 'SecurityPolicyLink', + 'Sku', 'SubResource', 'TagsObject', 'Timeseries', @@ -246,52 +321,56 @@ 'ValidateCustomDomainInput', 'ValidateCustomDomainOutput', 'WebApplicationFirewallPolicy', - 'ProfilePaged', - 'PreconfiguredEndpointPaged', - 'ExperimentPaged', - 'FrontDoorPaged', - 'FrontendEndpointPaged', - 'WebApplicationFirewallPolicyPaged', - 'ManagedRuleSetDefinitionPaged', - 'NetworkOperationStatus', - 'NetworkExperimentResourceState', - 'State', + 'WebApplicationFirewallPolicyList', + 'ActionType', 'AggregationInterval', - 'TimeseriesType', - 'EndpointType', - 'FrontDoorResourceState', + 'Availability', + 'BackendEnabledState', 'CustomHttpsProvisioningState', 'CustomHttpsProvisioningSubstate', + 'CustomRuleEnabledState', + 'DynamicCompressionEnabled', + 'EndpointType', + 'EnforceCertificateNameCheckEnabledState', 'FrontDoorCertificateSource', - 'MinimumTLSVersion', 'FrontDoorCertificateType', - 'EnforceCertificateNameCheckEnabledState', 'FrontDoorEnabledState', - 'FrontDoorProtocol', - 'RoutingRuleEnabledState', 'FrontDoorForwardingProtocol', + 'FrontDoorHealthProbeMethod', + 'FrontDoorProtocol', 'FrontDoorQuery', - 'DynamicCompressionEnabled', - 'FrontDoorRedirectType', 'FrontDoorRedirectProtocol', - 'BackendEnabledState', - 'FrontDoorHealthProbeMethod', + 'FrontDoorRedirectType', + 'FrontDoorResourceState', + 'FrontDoorTlsProtocolType', + 'HeaderActionType', 'HealthProbeEnabled', - 'SessionAffinityEnabledState', - 'ResourceType', - 'Availability', - 'PolicyEnabledState', - 'PolicyMode', - 'CustomRuleEnabledState', - 'RuleType', - 'MatchVariable', - 'Operator', - 'TransformType', - 'ActionType', + 'LatencyScorecardAggregationInterval', + 'ManagedRuleEnabledState', 'ManagedRuleExclusionMatchVariable', 'ManagedRuleExclusionSelectorMatchOperator', - 'ManagedRuleEnabledState', + 'ManagedRuleSetActionType', + 'MatchProcessingBehavior', + 'MatchVariable', + 'MinimumTLSVersion', + 'NetworkExperimentResourceState', + 'NetworkOperationStatus', + 'Operator', + 'PolicyEnabledState', + 'PolicyMode', + 'PolicyRequestBodyCheck', 'PolicyResourceState', - 'LatencyScorecardAggregationInterval', + 'PrivateEndpointStatus', + 'ResourceType', + 'RoutingRuleEnabledState', + 'RuleType', + 'RulesEngineMatchVariable', + 'RulesEngineOperator', + 'SessionAffinityEnabledState', + 'SkuName', + 'State', 'TimeseriesAggregationInterval', + 'TimeseriesType', + 'Transform', + 'TransformType', ] diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_front_door_management_client_enums.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_front_door_management_client_enums.py index 3b6f0ce5093..9c9b19ade63 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_front_door_management_client_enums.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_front_door_management_client_enums.py @@ -1,318 +1,481 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the action to take on rule match. + """ + + ALLOW = "Allow" + BLOCK = "Block" + LOG = "Log" + REDIRECT = "Redirect" + +class AggregationInterval(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The aggregation interval of the Timeseries + """ + + HOURLY = "Hourly" + DAILY = "Daily" + +class Availability(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether the name is available. + """ + + AVAILABLE = "Available" + UNAVAILABLE = "Unavailable" + +class BackendEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class CustomHttpsProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning status of Custom Https of the frontendEndpoint. + """ + + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + FAILED = "Failed" + +class CustomHttpsProvisioningSubstate(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + step. + """ + + SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST = "SubmittingDomainControlValidationRequest" + PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL = "PendingDomainControlValidationREquestApproval" + DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED = "DomainControlValidationRequestApproved" + DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED = "DomainControlValidationRequestRejected" + DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT = "DomainControlValidationRequestTimedOut" + ISSUING_CERTIFICATE = "IssuingCertificate" + DEPLOYING_CERTIFICATE = "DeployingCertificate" + CERTIFICATE_DEPLOYED = "CertificateDeployed" + DELETING_CERTIFICATE = "DeletingCertificate" + CERTIFICATE_DELETED = "CertificateDeleted" + +class CustomRuleEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not + specified. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class DynamicCompressionEnabled(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to use dynamic compression for cached content + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class EndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of endpoint + """ + + AFD = "AFD" + AZURE_REGION = "AzureRegion" + CDN = "CDN" + ATM = "ATM" + +class EnforceCertificateNameCheckEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to enforce certificate name check on HTTPS requests to all backend pools. No effect on + non-HTTPS requests. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class FrontDoorCertificateSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the source of the SSL certificate + """ + + AZURE_KEY_VAULT = "AzureKeyVault" + FRONT_DOOR = "FrontDoor" + +class FrontDoorCertificateType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the type of the certificate used for secure connections to a frontendEndpoint + """ + DEDICATED = "Dedicated" + +class FrontDoorEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Operational status of the Front Door load balancer. Permitted values are 'Enabled' or + 'Disabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" -class NetworkOperationStatus(str, Enum): - - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - - -class NetworkExperimentResourceState(str, Enum): - - creating = "Creating" - enabling = "Enabling" - enabled = "Enabled" - disabling = "Disabling" - disabled = "Disabled" - deleting = "Deleting" - - -class State(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class AggregationInterval(str, Enum): - - hourly = "Hourly" - daily = "Daily" - - -class TimeseriesType(str, Enum): - - measurement_counts = "MeasurementCounts" - latency_p50 = "LatencyP50" - latency_p75 = "LatencyP75" - latency_p95 = "LatencyP95" - - -class EndpointType(str, Enum): - - afd = "AFD" - azure_region = "AzureRegion" - cdn = "CDN" - atm = "ATM" - - -class FrontDoorResourceState(str, Enum): - - creating = "Creating" - enabling = "Enabling" - enabled = "Enabled" - disabling = "Disabling" - disabled = "Disabled" - deleting = "Deleting" - - -class CustomHttpsProvisioningState(str, Enum): - - enabling = "Enabling" - enabled = "Enabled" - disabling = "Disabling" - disabled = "Disabled" - failed = "Failed" - - -class CustomHttpsProvisioningSubstate(str, Enum): - - submitting_domain_control_validation_request = "SubmittingDomainControlValidationRequest" - pending_domain_control_validation_request_approval = "PendingDomainControlValidationREquestApproval" - domain_control_validation_request_approved = "DomainControlValidationRequestApproved" - domain_control_validation_request_rejected = "DomainControlValidationRequestRejected" - domain_control_validation_request_timed_out = "DomainControlValidationRequestTimedOut" - issuing_certificate = "IssuingCertificate" - deploying_certificate = "DeployingCertificate" - certificate_deployed = "CertificateDeployed" - deleting_certificate = "DeletingCertificate" - certificate_deleted = "CertificateDeleted" - - -class FrontDoorCertificateSource(str, Enum): - - azure_key_vault = "AzureKeyVault" - front_door = "FrontDoor" - - -class MinimumTLSVersion(str, Enum): - - one_full_stop_zero = "1.0" - one_full_stop_two = "1.2" - - -class FrontDoorCertificateType(str, Enum): - - dedicated = "Dedicated" - - -class EnforceCertificateNameCheckEnabledState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class FrontDoorEnabledState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class FrontDoorProtocol(str, Enum): - - http = "Http" - https = "Https" - - -class RoutingRuleEnabledState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class FrontDoorForwardingProtocol(str, Enum): - - http_only = "HttpOnly" - https_only = "HttpsOnly" - match_request = "MatchRequest" - - -class FrontDoorQuery(str, Enum): - - strip_none = "StripNone" - strip_all = "StripAll" - - -class DynamicCompressionEnabled(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class FrontDoorRedirectType(str, Enum): - - moved = "Moved" - found = "Found" - temporary_redirect = "TemporaryRedirect" - permanent_redirect = "PermanentRedirect" - - -class FrontDoorRedirectProtocol(str, Enum): - - http_only = "HttpOnly" - https_only = "HttpsOnly" - match_request = "MatchRequest" - - -class BackendEnabledState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class FrontDoorHealthProbeMethod(str, Enum): - - get = "GET" - head = "HEAD" - - -class HealthProbeEnabled(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SessionAffinityEnabledState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class ResourceType(str, Enum): - - microsoft_networkfront_doors = "Microsoft.Network/frontDoors" - microsoft_networkfront_doorsfrontend_endpoints = "Microsoft.Network/frontDoors/frontendEndpoints" - - -class Availability(str, Enum): - - available = "Available" - unavailable = "Unavailable" - - -class PolicyEnabledState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class PolicyMode(str, Enum): - - prevention = "Prevention" - detection = "Detection" - - -class CustomRuleEnabledState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class RuleType(str, Enum): - - match_rule = "MatchRule" - rate_limit_rule = "RateLimitRule" - - -class MatchVariable(str, Enum): - - remote_addr = "RemoteAddr" - request_method = "RequestMethod" - query_string = "QueryString" - post_args = "PostArgs" - request_uri = "RequestUri" - request_header = "RequestHeader" - request_body = "RequestBody" - cookies = "Cookies" - socket_addr = "SocketAddr" - - -class Operator(str, Enum): - - any = "Any" - ip_match = "IPMatch" - geo_match = "GeoMatch" - equal = "Equal" - contains = "Contains" - less_than = "LessThan" - greater_than = "GreaterThan" - less_than_or_equal = "LessThanOrEqual" - greater_than_or_equal = "GreaterThanOrEqual" - begins_with = "BeginsWith" - ends_with = "EndsWith" - reg_ex = "RegEx" - - -class TransformType(str, Enum): - - lowercase = "Lowercase" - uppercase = "Uppercase" - trim = "Trim" - url_decode = "UrlDecode" - url_encode = "UrlEncode" - remove_nulls = "RemoveNulls" - - -class ActionType(str, Enum): - - allow = "Allow" - block = "Block" - log = "Log" - redirect = "Redirect" - - -class ManagedRuleExclusionMatchVariable(str, Enum): - - request_header_names = "RequestHeaderNames" - request_cookie_names = "RequestCookieNames" - query_string_arg_names = "QueryStringArgNames" - request_body_post_arg_names = "RequestBodyPostArgNames" - - -class ManagedRuleExclusionSelectorMatchOperator(str, Enum): - - equals = "Equals" - contains = "Contains" - starts_with = "StartsWith" - ends_with = "EndsWith" - equals_any = "EqualsAny" - - -class ManagedRuleEnabledState(str, Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class PolicyResourceState(str, Enum): - - creating = "Creating" - enabling = "Enabling" - enabled = "Enabled" - disabling = "Disabling" - disabled = "Disabled" - deleting = "Deleting" - - -class LatencyScorecardAggregationInterval(str, Enum): - - daily = "Daily" - weekly = "Weekly" - monthly = "Monthly" - - -class TimeseriesAggregationInterval(str, Enum): - - hourly = "Hourly" - daily = "Daily" +class FrontDoorForwardingProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Protocol this rule will use when forwarding traffic to backends. + """ + + HTTP_ONLY = "HttpOnly" + HTTPS_ONLY = "HttpsOnly" + MATCH_REQUEST = "MatchRequest" + +class FrontDoorHealthProbeMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Configures which HTTP method to use to probe the backends defined under backendPools. + """ + + GET = "GET" + HEAD = "HEAD" + +class FrontDoorProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Accepted protocol schemes. + """ + + HTTP = "Http" + HTTPS = "Https" + +class FrontDoorQuery(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Treatment of URL query terms when forming the cache key. + """ + + STRIP_NONE = "StripNone" + STRIP_ALL = "StripAll" + STRIP_ONLY = "StripOnly" + STRIP_ALL_EXCEPT = "StripAllExcept" + +class FrontDoorRedirectProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol of the destination to where the traffic is redirected + """ + + HTTP_ONLY = "HttpOnly" + HTTPS_ONLY = "HttpsOnly" + MATCH_REQUEST = "MatchRequest" + +class FrontDoorRedirectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The redirect type the rule will use when redirecting traffic. + """ + + MOVED = "Moved" + FOUND = "Found" + TEMPORARY_REDIRECT = "TemporaryRedirect" + PERMANENT_REDIRECT = "PermanentRedirect" + +class FrontDoorResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource status of the Front Door or Front Door SubResource. + """ + + CREATING = "Creating" + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + DELETING = "Deleting" + +class FrontDoorTlsProtocolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the TLS extension protocol that is used for secure delivery + """ + + SERVER_NAME_INDICATION = "ServerNameIndication" + +class HeaderActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Which type of manipulation to apply to the header. + """ + + APPEND = "Append" + DELETE = "Delete" + OVERWRITE = "Overwrite" + +class HealthProbeEnabled(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to enable health probes to be made against backends defined under backendPools. Health + probes can only be disabled if there is a single enabled backend in single enabled backend + pool. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class LatencyScorecardAggregationInterval(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + DAILY = "Daily" + WEEKLY = "Weekly" + MONTHLY = "Monthly" + +class ManagedRuleEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if the managed rule is in enabled or disabled state. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ManagedRuleExclusionMatchVariable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The variable type to be excluded. + """ + + REQUEST_HEADER_NAMES = "RequestHeaderNames" + REQUEST_COOKIE_NAMES = "RequestCookieNames" + QUERY_STRING_ARG_NAMES = "QueryStringArgNames" + REQUEST_BODY_POST_ARG_NAMES = "RequestBodyPostArgNames" + REQUEST_BODY_JSON_ARG_NAMES = "RequestBodyJsonArgNames" + +class ManagedRuleExclusionSelectorMatchOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Comparison operator to apply to the selector when specifying which elements in the collection + this exclusion applies to. + """ + + EQUALS = "Equals" + CONTAINS = "Contains" + STARTS_WITH = "StartsWith" + ENDS_WITH = "EndsWith" + EQUALS_ANY = "EqualsAny" + +class ManagedRuleSetActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the action to take when a managed rule set score threshold is met. + """ + + BLOCK = "Block" + LOG = "Log" + REDIRECT = "Redirect" + +class MatchProcessingBehavior(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """If this rule is a match should the rules engine continue running the remaining rules or stop. + If not present, defaults to Continue. + """ + + CONTINUE_ENUM = "Continue" + STOP = "Stop" + +class MatchVariable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Request variable to compare with. + """ + + REMOTE_ADDR = "RemoteAddr" + REQUEST_METHOD = "RequestMethod" + QUERY_STRING = "QueryString" + POST_ARGS = "PostArgs" + REQUEST_URI = "RequestUri" + REQUEST_HEADER = "RequestHeader" + REQUEST_BODY = "RequestBody" + COOKIES = "Cookies" + SOCKET_ADDR = "SocketAddr" + +class MinimumTLSVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The minimum TLS version required from the clients to establish an SSL handshake with Front + Door. + """ + + ONE0 = "1.0" + ONE2 = "1.2" + +class NetworkExperimentResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines the server side resource status + """ + + CREATING = "Creating" + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + DELETING = "Deleting" + +class NetworkOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and + 'Failed'. + """ + + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class Operator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Comparison type to use for matching with the variable value. + """ + + ANY = "Any" + IP_MATCH = "IPMatch" + GEO_MATCH = "GeoMatch" + EQUAL = "Equal" + CONTAINS = "Contains" + LESS_THAN = "LessThan" + GREATER_THAN = "GreaterThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + BEGINS_WITH = "BeginsWith" + ENDS_WITH = "EndsWith" + REG_EX = "RegEx" + +class PolicyEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class PolicyMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if it is in detection mode or prevention mode at policy level. + """ + + PREVENTION = "Prevention" + DETECTION = "Detection" + +class PolicyRequestBodyCheck(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if policy managed rules will inspect the request body content. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class PolicyResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource status of the policy. + """ + + CREATING = "Creating" + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + DELETING = "Deleting" + +class PrivateEndpointStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Approval status for the connection to the Private Link + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + TIMEOUT = "Timeout" + +class ResourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of Front Door resource used in CheckNameAvailability. + """ + + MICROSOFT_NETWORK_FRONT_DOORS = "Microsoft.Network/frontDoors" + MICROSOFT_NETWORK_FRONT_DOORS_FRONTEND_ENDPOINTS = "Microsoft.Network/frontDoors/frontendEndpoints" + +class RoutingRuleEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class RulesEngineMatchVariable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Match Variable + """ + + IS_MOBILE = "IsMobile" + REMOTE_ADDR = "RemoteAddr" + REQUEST_METHOD = "RequestMethod" + QUERY_STRING = "QueryString" + POST_ARGS = "PostArgs" + REQUEST_URI = "RequestUri" + REQUEST_PATH = "RequestPath" + REQUEST_FILENAME = "RequestFilename" + REQUEST_FILENAME_EXTENSION = "RequestFilenameExtension" + REQUEST_HEADER = "RequestHeader" + REQUEST_BODY = "RequestBody" + REQUEST_SCHEME = "RequestScheme" + +class RulesEngineOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes operator to apply to the match condition. + """ + + ANY = "Any" + IP_MATCH = "IPMatch" + GEO_MATCH = "GeoMatch" + EQUAL = "Equal" + CONTAINS = "Contains" + LESS_THAN = "LessThan" + GREATER_THAN = "GreaterThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + BEGINS_WITH = "BeginsWith" + ENDS_WITH = "EndsWith" + +class RuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes type of rule. + """ + + MATCH_RULE = "MatchRule" + RATE_LIMIT_RULE = "RateLimitRule" + +class SessionAffinityEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the pricing tier. + """ + + CLASSIC_AZURE_FRONT_DOOR = "Classic_AzureFrontDoor" + STANDARD_AZURE_FRONT_DOOR = "Standard_AzureFrontDoor" + PREMIUM_AZURE_FRONT_DOOR = "Premium_AzureFrontDoor" + +class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the Experiment + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class TimeseriesAggregationInterval(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + HOURLY = "Hourly" + DAILY = "Daily" + +class TimeseriesType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of Timeseries + """ + + MEASUREMENT_COUNTS = "MeasurementCounts" + LATENCY_P50 = "LatencyP50" + LATENCY_P75 = "LatencyP75" + LATENCY_P95 = "LatencyP95" + +class Transform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes what transforms are applied before matching + """ + + LOWERCASE = "Lowercase" + UPPERCASE = "Uppercase" + TRIM = "Trim" + URL_DECODE = "UrlDecode" + URL_ENCODE = "UrlEncode" + REMOVE_NULLS = "RemoveNulls" + +class TransformType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes what transforms applied before matching. + """ + + LOWERCASE = "Lowercase" + UPPERCASE = "Uppercase" + TRIM = "Trim" + URL_DECODE = "UrlDecode" + URL_ENCODE = "UrlEncode" + REMOVE_NULLS = "RemoveNulls" diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models.py index dafda2e813c..c01fb5be775 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models.py @@ -1,31 +1,20 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +from azure.core.exceptions import HttpResponseError +import msrest.serialization -class AzureAsyncOperationResult(Model): - """The response body contains the status of the specified asynchronous - operation, indicating whether it has succeeded, is in progress, or has - failed. Note that this status is distinct from the HTTP status code - returned for the Get Operation Status operation itself. If the asynchronous - operation succeeded, the response body includes the HTTP status code for - the successful request. If the asynchronous operation failed, the response - body includes the HTTP status code for the failed request and error - information regarding the failure. +class AzureAsyncOperationResult(msrest.serialization.Model): + """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - :param status: Status of the Azure async operation. Possible values are: - 'InProgress', 'Succeeded', and 'Failed'. Possible values include: - 'InProgress', 'Succeeded', 'Failed' + :param status: Status of the Azure async operation. Possible values are: 'InProgress', + 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.frontdoor.models.NetworkOperationStatus :param error: :type error: ~azure.mgmt.frontdoor.models.Error @@ -36,38 +25,56 @@ class AzureAsyncOperationResult(Model): 'error': {'key': 'error', 'type': 'Error'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AzureAsyncOperationResult, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.error = kwargs.get('error', None) -class Backend(Model): +class Backend(msrest.serialization.Model): """Backend address of a frontDoor load balancer. - :param address: Location of the backend (IP address or FQDN) + Variables are only populated by the server, and will be ignored when sending a request. + + :param address: Location of the backend (IP address or FQDN). :type address: str + :param private_link_alias: The Alias of the Private Link resource. Populating this optional + field indicates that this backend is 'Private'. + :type private_link_alias: str + :param private_link_resource_id: The Resource Id of the Private Link resource. Populating this + optional field indicates that this backend is 'Private'. + :type private_link_resource_id: str + :param private_link_location: The location of the Private Link resource. Required only if + 'privateLinkResourceId' is populated. + :type private_link_location: str + :ivar private_endpoint_status: The Approval status for the connection to the Private Link. + Possible values include: "Pending", "Approved", "Rejected", "Disconnected", "Timeout". + :vartype private_endpoint_status: str or ~azure.mgmt.frontdoor.models.PrivateEndpointStatus + :param private_link_approval_message: A custom message to be included in the approval request + to connect to the Private Link. + :type private_link_approval_message: str :param http_port: The HTTP TCP port number. Must be between 1 and 65535. :type http_port: int :param https_port: The HTTPS TCP port number. Must be between 1 and 65535. :type https_port: int - :param enabled_state: Whether to enable use of this backend. Permitted - values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.BackendEnabledState - :param priority: Priority to use for load balancing. Higher priorities - will not be used for load balancing if any lower priority backend is - healthy. + :param enabled_state: Whether to enable use of this backend. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.BackendEnabledState + :param priority: Priority to use for load balancing. Higher priorities will not be used for + load balancing if any lower priority backend is healthy. :type priority: int :param weight: Weight of this endpoint for load balancing purposes. :type weight: int - :param backend_host_header: The value to use as the host header sent to - the backend. If blank or unspecified, this defaults to the incoming host. + :param backend_host_header: The value to use as the host header sent to the backend. If blank + or unspecified, this defaults to the incoming host. :type backend_host_header: str """ _validation = { + 'private_endpoint_status': {'readonly': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, 'priority': {'maximum': 5, 'minimum': 1}, @@ -76,6 +83,11 @@ class Backend(Model): _attribute_map = { 'address': {'key': 'address', 'type': 'str'}, + 'private_link_alias': {'key': 'privateLinkAlias', 'type': 'str'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'private_link_location': {'key': 'privateLinkLocation', 'type': 'str'}, + 'private_endpoint_status': {'key': 'privateEndpointStatus', 'type': 'str'}, + 'private_link_approval_message': {'key': 'privateLinkApprovalMessage', 'type': 'str'}, 'http_port': {'key': 'httpPort', 'type': 'int'}, 'https_port': {'key': 'httpsPort', 'type': 'int'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, @@ -84,9 +96,17 @@ class Backend(Model): 'backend_host_header': {'key': 'backendHostHeader', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Backend, self).__init__(**kwargs) self.address = kwargs.get('address', None) + self.private_link_alias = kwargs.get('private_link_alias', None) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.private_link_location = kwargs.get('private_link_location', None) + self.private_endpoint_status = None + self.private_link_approval_message = kwargs.get('private_link_approval_message', None) self.http_port = kwargs.get('http_port', None) self.https_port = kwargs.get('https_port', None) self.enabled_state = kwargs.get('enabled_state', None) @@ -95,7 +115,7 @@ def __init__(self, **kwargs): self.backend_host_header = kwargs.get('backend_host_header', None) -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. :param id: Resource ID. @@ -106,7 +126,10 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) @@ -114,62 +137,61 @@ def __init__(self, **kwargs): class BackendPool(SubResource): """A backend pool is a collection of backends that can be routed to. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param backends: The set of backends for this pool - :type backends: list[~azure.mgmt.frontdoor.models.Backend] - :param load_balancing_settings: Load balancing settings for a backend pool - :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource - :param health_probe_settings: L7 health probe settings for a backend pool - :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str + :param backends: The set of backends for this pool. + :type backends: list[~azure.mgmt.frontdoor.models.Backend] + :param load_balancing_settings: Load balancing settings for a backend pool. + :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource + :param health_probe_settings: L7 health probe settings for a backend pool. + :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'backends': {'key': 'properties.backends', 'type': '[Backend]'}, 'load_balancing_settings': {'key': 'properties.loadBalancingSettings', 'type': 'SubResource'}, 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'SubResource'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(BackendPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None self.backends = kwargs.get('backends', None) self.load_balancing_settings = kwargs.get('load_balancing_settings', None) self.health_probe_settings = kwargs.get('health_probe_settings', None) - self.resource_state = kwargs.get('resource_state', None) - self.name = kwargs.get('name', None) - self.type = None + self.resource_state = None -class BackendPoolListResult(Model): - """Result of the request to list Backend Pools. It contains a list of Backend - Pools objects and a URL link to get the next set of results. +class BackendPoolListResult(msrest.serialization.Model): + """Result of the request to list Backend Pools. It contains a list of Backend Pools objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Backend Pools within a Front Door. :vartype value: list[~azure.mgmt.frontdoor.models.BackendPool] - :param next_link: URL to get the next set of BackendPool objects if there - are any. + :param next_link: URL to get the next set of BackendPool objects if there are any. :type next_link: str """ @@ -182,101 +204,152 @@ class BackendPoolListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(BackendPoolListResult, self).__init__(**kwargs) self.value = None self.next_link = kwargs.get('next_link', None) -class BackendPoolsSettings(Model): - """Settings that apply to all backend pools. +class BackendPoolUpdateParameters(msrest.serialization.Model): + """A collection of backends that can be routed to. - :param enforce_certificate_name_check: Whether to enforce certificate name - check on HTTPS requests to all backend pools. No effect on non-HTTPS - requests. Possible values include: 'Enabled', 'Disabled'. Default value: - "Enabled" . - :type enforce_certificate_name_check: str or - ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState - :param send_recv_timeout_seconds: Send and receive timeout on forwarding - request to the backend. When timeout is reached, the request fails and - returns. - :type send_recv_timeout_seconds: int + :param backends: The set of backends for this pool. + :type backends: list[~azure.mgmt.frontdoor.models.Backend] + :param load_balancing_settings: Load balancing settings for a backend pool. + :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource + :param health_probe_settings: L7 health probe settings for a backend pool. + :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource """ - _validation = { - 'send_recv_timeout_seconds': {'minimum': 16}, - } - _attribute_map = { - 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, - 'send_recv_timeout_seconds': {'key': 'sendRecvTimeoutSeconds', 'type': 'int'}, + 'backends': {'key': 'backends', 'type': '[Backend]'}, + 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': 'SubResource'}, + 'health_probe_settings': {'key': 'healthProbeSettings', 'type': 'SubResource'}, } - def __init__(self, **kwargs): - super(BackendPoolsSettings, self).__init__(**kwargs) - self.enforce_certificate_name_check = kwargs.get('enforce_certificate_name_check', "Enabled") - self.send_recv_timeout_seconds = kwargs.get('send_recv_timeout_seconds', None) + def __init__( + self, + **kwargs + ): + super(BackendPoolUpdateParameters, self).__init__(**kwargs) + self.backends = kwargs.get('backends', None) + self.load_balancing_settings = kwargs.get('load_balancing_settings', None) + self.health_probe_settings = kwargs.get('health_probe_settings', None) -class BackendPoolUpdateParameters(Model): - """A collection of backends that can be routed to. +class BackendPoolProperties(BackendPoolUpdateParameters): + """The JSON object that contains the properties required to create a Backend Pool. - :param backends: The set of backends for this pool + Variables are only populated by the server, and will be ignored when sending a request. + + :param backends: The set of backends for this pool. :type backends: list[~azure.mgmt.frontdoor.models.Backend] - :param load_balancing_settings: Load balancing settings for a backend pool + :param load_balancing_settings: Load balancing settings for a backend pool. :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource - :param health_probe_settings: L7 health probe settings for a backend pool + :param health_probe_settings: L7 health probe settings for a backend pool. :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ + _validation = { + 'resource_state': {'readonly': True}, + } + _attribute_map = { 'backends': {'key': 'backends', 'type': '[Backend]'}, 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': 'SubResource'}, 'health_probe_settings': {'key': 'healthProbeSettings', 'type': 'SubResource'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, } - def __init__(self, **kwargs): - super(BackendPoolUpdateParameters, self).__init__(**kwargs) - self.backends = kwargs.get('backends', None) - self.load_balancing_settings = kwargs.get('load_balancing_settings', None) - self.health_probe_settings = kwargs.get('health_probe_settings', None) + def __init__( + self, + **kwargs + ): + super(BackendPoolProperties, self).__init__(**kwargs) + self.resource_state = None + + +class BackendPoolsSettings(msrest.serialization.Model): + """Settings that apply to all backend pools. + + :param enforce_certificate_name_check: Whether to enforce certificate name check on HTTPS + requests to all backend pools. No effect on non-HTTPS requests. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type enforce_certificate_name_check: str or + ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState + :param send_recv_timeout_seconds: Send and receive timeout on forwarding request to the + backend. When timeout is reached, the request fails and returns. + :type send_recv_timeout_seconds: int + """ + + _validation = { + 'send_recv_timeout_seconds': {'minimum': 16}, + } + _attribute_map = { + 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, + 'send_recv_timeout_seconds': {'key': 'sendRecvTimeoutSeconds', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(BackendPoolsSettings, self).__init__(**kwargs) + self.enforce_certificate_name_check = kwargs.get('enforce_certificate_name_check', "Enabled") + self.send_recv_timeout_seconds = kwargs.get('send_recv_timeout_seconds', None) -class CacheConfiguration(Model): - """Caching settings for a caching-type route. To disable caching, do not - provide a cacheConfiguration object. - :param query_parameter_strip_directive: Treatment of URL query terms when - forming the cache key. Possible values include: 'StripNone', 'StripAll' - :type query_parameter_strip_directive: str or - ~azure.mgmt.frontdoor.models.FrontDoorQuery - :param dynamic_compression: Whether to use dynamic compression for cached - content. Possible values include: 'Enabled', 'Disabled' - :type dynamic_compression: str or - ~azure.mgmt.frontdoor.models.DynamicCompressionEnabled +class CacheConfiguration(msrest.serialization.Model): + """Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + + :param query_parameter_strip_directive: Treatment of URL query terms when forming the cache + key. Possible values include: "StripNone", "StripAll", "StripOnly", "StripAllExcept". + :type query_parameter_strip_directive: str or ~azure.mgmt.frontdoor.models.FrontDoorQuery + :param query_parameters: query parameters to include or exclude (comma separated). + :type query_parameters: str + :param dynamic_compression: Whether to use dynamic compression for cached content. Possible + values include: "Enabled", "Disabled". + :type dynamic_compression: str or ~azure.mgmt.frontdoor.models.DynamicCompressionEnabled + :param cache_duration: The duration for which the content needs to be cached. Allowed format is + in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). HTTP requires the value + to be no more than a year. + :type cache_duration: ~datetime.timedelta """ _attribute_map = { 'query_parameter_strip_directive': {'key': 'queryParameterStripDirective', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, 'dynamic_compression': {'key': 'dynamicCompression', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'duration'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CacheConfiguration, self).__init__(**kwargs) self.query_parameter_strip_directive = kwargs.get('query_parameter_strip_directive', None) + self.query_parameters = kwargs.get('query_parameters', None) self.dynamic_compression = kwargs.get('dynamic_compression', None) + self.cache_duration = kwargs.get('cache_duration', None) -class CheckNameAvailabilityInput(Model): +class CheckNameAvailabilityInput(msrest.serialization.Model): """Input of CheckNameAvailability API. All required parameters must be populated in order to send to Azure. :param name: Required. The resource name to validate. :type name: str - :param type: Required. The type of the resource whose name is to be - validated. Possible values include: 'Microsoft.Network/frontDoors', - 'Microsoft.Network/frontDoors/frontendEndpoints' + :param type: Required. The type of the resource whose name is to be validated. Possible values + include: "Microsoft.Network/frontDoors", "Microsoft.Network/frontDoors/frontendEndpoints". :type type: str or ~azure.mgmt.frontdoor.models.ResourceType """ @@ -287,29 +360,29 @@ class CheckNameAvailabilityInput(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceType'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CheckNameAvailabilityInput, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) + self.name = kwargs['name'] + self.type = kwargs['type'] -class CheckNameAvailabilityOutput(Model): +class CheckNameAvailabilityOutput(msrest.serialization.Model): """Output of check name availability API. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar name_availability: Indicates whether the name is available. Possible - values include: 'Available', 'Unavailable' - :vartype name_availability: str or - ~azure.mgmt.frontdoor.models.Availability + :ivar name_availability: Indicates whether the name is available. Possible values include: + "Available", "Unavailable". + :vartype name_availability: str or ~azure.mgmt.frontdoor.models.Availability :ivar reason: The reason why the name is not available. :vartype reason: str - :ivar message: The detailed error message describing why the name is not - available. + :ivar message: The detailed error message describing why the name is not available. :vartype message: str """ @@ -325,60 +398,45 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.name_availability = None self.reason = None self.message = None -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class CustomHttpsConfiguration(Model): +class CustomHttpsConfiguration(msrest.serialization.Model): """Https settings for a domain. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. - :param certificate_source: Required. Defines the source of the SSL - certificate. Possible values include: 'AzureKeyVault', 'FrontDoor' - :type certificate_source: str or - ~azure.mgmt.frontdoor.models.FrontDoorCertificateSource - :ivar protocol_type: Required. Defines the TLS extension protocol that is - used for secure delivery. Default value: "ServerNameIndication" . - :vartype protocol_type: str - :param minimum_tls_version: Required. The minimum TLS version required - from the clients to establish an SSL handshake with Front Door. Possible - values include: '1.0', '1.2' - :type minimum_tls_version: str or - ~azure.mgmt.frontdoor.models.MinimumTLSVersion - :param vault: The Key Vault containing the SSL certificate - :type vault: - ~azure.mgmt.frontdoor.models.KeyVaultCertificateSourceParametersVault - :param secret_name: The name of the Key Vault secret representing the full - certificate PFX + :param certificate_source: Required. Defines the source of the SSL certificate. Possible values + include: "AzureKeyVault", "FrontDoor". + :type certificate_source: str or ~azure.mgmt.frontdoor.models.FrontDoorCertificateSource + :param protocol_type: Required. Defines the TLS extension protocol that is used for secure + delivery. Possible values include: "ServerNameIndication". + :type protocol_type: str or ~azure.mgmt.frontdoor.models.FrontDoorTlsProtocolType + :param minimum_tls_version: Required. The minimum TLS version required from the clients to + establish an SSL handshake with Front Door. Possible values include: "1.0", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.frontdoor.models.MinimumTLSVersion + :param certificate_type: Defines the type of the certificate used for secure connections to a + frontendEndpoint. Possible values include: "Dedicated". + :type certificate_type: str or ~azure.mgmt.frontdoor.models.FrontDoorCertificateType + :param vault: The Key Vault containing the SSL certificate. + :type vault: ~azure.mgmt.frontdoor.models.KeyVaultCertificateSourceParametersVault + :param secret_name: The name of the Key Vault secret representing the full certificate PFX. :type secret_name: str - :param secret_version: The version of the Key Vault secret representing - the full certificate PFX + :param secret_version: The version of the Key Vault secret representing the full certificate + PFX. :type secret_version: str - :param certificate_type: Defines the type of the certificate used for - secure connections to a frontendEndpoint. Possible values include: - 'Dedicated' - :type certificate_type: str or - ~azure.mgmt.frontdoor.models.FrontDoorCertificateType """ _validation = { 'certificate_source': {'required': True}, - 'protocol_type': {'required': True, 'constant': True}, + 'protocol_type': {'required': True}, 'minimum_tls_version': {'required': True}, } @@ -386,57 +444,56 @@ class CustomHttpsConfiguration(Model): 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'protocol_type': {'key': 'protocolType', 'type': 'str'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + 'certificate_type': {'key': 'frontDoorCertificateSourceParameters.certificateType', 'type': 'str'}, 'vault': {'key': 'keyVaultCertificateSourceParameters.vault', 'type': 'KeyVaultCertificateSourceParametersVault'}, 'secret_name': {'key': 'keyVaultCertificateSourceParameters.secretName', 'type': 'str'}, 'secret_version': {'key': 'keyVaultCertificateSourceParameters.secretVersion', 'type': 'str'}, - 'certificate_type': {'key': 'frontDoorCertificateSourceParameters.certificateType', 'type': 'str'}, } - protocol_type = "ServerNameIndication" - - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CustomHttpsConfiguration, self).__init__(**kwargs) - self.certificate_source = kwargs.get('certificate_source', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) + self.certificate_source = kwargs['certificate_source'] + self.protocol_type = kwargs['protocol_type'] + self.minimum_tls_version = kwargs['minimum_tls_version'] + self.certificate_type = kwargs.get('certificate_type', None) self.vault = kwargs.get('vault', None) self.secret_name = kwargs.get('secret_name', None) self.secret_version = kwargs.get('secret_version', None) - self.certificate_type = kwargs.get('certificate_type', None) -class CustomRule(Model): +class CustomRule(msrest.serialization.Model): """Defines contents of a web application rule. All required parameters must be populated in order to send to Azure. :param name: Describes the name of the rule. :type name: str - :param priority: Required. Describes priority of the rule. Rules with a - lower value will be evaluated before rules with a higher value. + :param priority: Required. Describes priority of the rule. Rules with a lower value will be + evaluated before rules with a higher value. :type priority: int - :param enabled_state: Describes if the custom rule is in enabled or - disabled state. Defaults to Enabled if not specified. Possible values - include: 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.CustomRuleEnabledState - :param rule_type: Required. Describes type of rule. Possible values - include: 'MatchRule', 'RateLimitRule' + :param enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to + Enabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.CustomRuleEnabledState + :param rule_type: Required. Describes type of rule. Possible values include: "MatchRule", + "RateLimitRule". :type rule_type: str or ~azure.mgmt.frontdoor.models.RuleType - :param rate_limit_duration_in_minutes: Time window for resetting the rate - limit count. Default is 1 minute. + :param rate_limit_duration_in_minutes: Time window for resetting the rate limit count. Default + is 1 minute. :type rate_limit_duration_in_minutes: int - :param rate_limit_threshold: Number of allowed requests per client within - the time window. + :param rate_limit_threshold: Number of allowed requests per client within the time window. :type rate_limit_threshold: int :param match_conditions: Required. List of match conditions. :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition] - :param action: Required. Describes what action to be applied when rule - matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :param action: Required. Describes what action to be applied when rule matches. Possible values + include: "Allow", "Block", "Log", "Redirect". :type action: str or ~azure.mgmt.frontdoor.models.ActionType """ _validation = { - 'name': {'max_length': 128}, + 'name': {'max_length': 128, 'min_length': 0}, 'priority': {'required': True}, 'rule_type': {'required': True}, 'rate_limit_duration_in_minutes': {'maximum': 5, 'minimum': 0}, @@ -456,22 +513,25 @@ class CustomRule(Model): 'action': {'key': 'action', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CustomRule, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.priority = kwargs.get('priority', None) + self.priority = kwargs['priority'] self.enabled_state = kwargs.get('enabled_state', None) - self.rule_type = kwargs.get('rule_type', None) + self.rule_type = kwargs['rule_type'] self.rate_limit_duration_in_minutes = kwargs.get('rate_limit_duration_in_minutes', None) self.rate_limit_threshold = kwargs.get('rate_limit_threshold', None) - self.match_conditions = kwargs.get('match_conditions', None) - self.action = kwargs.get('action', None) + self.match_conditions = kwargs['match_conditions'] + self.action = kwargs['action'] -class CustomRuleList(Model): +class CustomRuleList(msrest.serialization.Model): """Defines contents of custom rules. - :param rules: List of rules + :param rules: List of rules. :type rules: list[~azure.mgmt.frontdoor.models.CustomRule] """ @@ -479,17 +539,20 @@ class CustomRuleList(Model): 'rules': {'key': 'rules', 'type': '[CustomRule]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CustomRuleList, self).__init__(**kwargs) self.rules = kwargs.get('rules', None) -class Endpoint(Model): +class Endpoint(msrest.serialization.Model): """Defines the endpoint properties. - :param name: The name of the endpoint + :param name: The name of the endpoint. :type name: str - :param endpoint: The endpoint URL + :param endpoint: The endpoint URL. :type endpoint: str """ @@ -498,13 +561,16 @@ class Endpoint(Model): 'endpoint': {'key': 'endpoint', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Endpoint, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.endpoint = kwargs.get('endpoint', None) -class Error(Model): +class Error(msrest.serialization.Model): """Error. :param code: @@ -527,7 +593,10 @@ class Error(Model): 'inner_error': {'key': 'innerError', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Error, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -536,7 +605,7 @@ def __init__(self, **kwargs): self.inner_error = kwargs.get('inner_error', None) -class ErrorDetails(Model): +class ErrorDetails(msrest.serialization.Model): """ErrorDetails. :param code: @@ -553,19 +622,20 @@ class ErrorDetails(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ErrorDetails, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.target = kwargs.get('target', None) self.message = kwargs.get('message', None) -class ErrorResponse(Model): - """Error response indicates Front Door service is not able to process the - incoming request. The reason is provided in the error message. +class ErrorResponse(msrest.serialization.Model): + """Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Error code. :vartype code: str @@ -583,29 +653,19 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class Resource(Model): +class Resource(msrest.serialization.Model): """Common resource representation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -615,7 +675,7 @@ class Resource(Model): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -633,7 +693,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -645,8 +708,7 @@ def __init__(self, **kwargs): class Experiment(Resource): """Defines the properties of an Experiment. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -656,25 +718,23 @@ class Experiment(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the details or intents of the - Experiment + :param description: The description of the details or intents of the Experiment. :type description: str - :param endpoint_a: The endpoint A of an experiment + :param endpoint_a: The endpoint A of an experiment. :type endpoint_a: ~azure.mgmt.frontdoor.models.Endpoint - :param endpoint_b: The endpoint B of an experiment + :param endpoint_b: The endpoint B of an experiment. :type endpoint_b: ~azure.mgmt.frontdoor.models.Endpoint - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState - :ivar status: The description of Experiment status from the server side + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState + :ivar status: The description of Experiment status from the server side. :vartype status: str - :ivar script_file_uri: The uri to the Script used in the Experiment + :ivar script_file_uri: The uri to the Script used in the Experiment. :vartype script_file_uri: str """ @@ -682,6 +742,7 @@ class Experiment(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'status': {'readonly': True}, 'script_file_uri': {'readonly': True}, } @@ -701,27 +762,58 @@ class Experiment(Resource): 'script_file_uri': {'key': 'properties.scriptFileUri', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Experiment, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.endpoint_a = kwargs.get('endpoint_a', None) self.endpoint_b = kwargs.get('endpoint_b', None) self.enabled_state = kwargs.get('enabled_state', None) - self.resource_state = kwargs.get('resource_state', None) + self.resource_state = None self.status = None self.script_file_uri = None -class ExperimentUpdateModel(Model): +class ExperimentList(msrest.serialization.Model): + """Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiments within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.Experiment] + :param next_link: URL to get the next set of Experiment objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Experiment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class ExperimentUpdateModel(msrest.serialization.Model): """Defines modifiable attributes of an Experiment. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the intent or details of the - Experiment + :param description: The description of the intent or details of the Experiment. :type description: str - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ @@ -731,40 +823,46 @@ class ExperimentUpdateModel(Model): 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ExperimentUpdateModel, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.description = kwargs.get('description', None) self.enabled_state = kwargs.get('enabled_state', None) -class RouteConfiguration(Model): +class RouteConfiguration(msrest.serialization.Model): """Base class for all types of Route. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ForwardingConfiguration, RedirectConfiguration + sub-classes are: ForwardingConfiguration, RedirectConfiguration. All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, } _subtype_map = { - 'odatatype': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} + 'odata_type': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RouteConfiguration, self).__init__(**kwargs) - self.odatatype = None + self.odata_type = None # type: Optional[str] class ForwardingConfiguration(RouteConfiguration): @@ -772,51 +870,48 @@ class ForwardingConfiguration(RouteConfiguration): All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param custom_forwarding_path: A custom path used to rewrite resource paths matched by this + rule. Leave empty to use incoming path. :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. + :param forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. + Possible values include: "HttpOnly", "HttpsOnly", "MatchRequest". + :type forwarding_protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol + :param cache_configuration: The caching configuration associated with this rule. :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. + :param backend_pool: A reference to the BackendPool which this rule routes to. :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ForwardingConfiguration, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' # type: str self.custom_forwarding_path = kwargs.get('custom_forwarding_path', None) self.forwarding_protocol = kwargs.get('forwarding_protocol', None) self.cache_configuration = kwargs.get('cache_configuration', None) self.backend_pool = kwargs.get('backend_pool', None) - self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' class FrontDoor(Resource): - """Front Door represents a collection of backend endpoints to route traffic to - along with rules that specify how traffic is sent there. + """Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is sent there. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -826,50 +921,48 @@ class FrontDoor(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param friendly_name: A friendly name for the frontDoor + :param friendly_name: A friendly name for the frontDoor. :type friendly_name: str :param routing_rules: Routing rules associated with this Front Door. :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param load_balancing_settings: Load balancing settings associated with - this Front Door instance. - :type load_balancing_settings: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param health_probe_settings: Health probe settings associated with this - Front Door instance. - :type health_probe_settings: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] :param backend_pools: Backend pools available to routing rules. :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] :param frontend_endpoints: Frontend endpoints available to routing rules. - :type frontend_endpoints: - list[~azure.mgmt.frontdoor.models.FrontendEndpoint] - :param backend_pools_settings: Settings for all backendPools - :type backend_pools_settings: - ~azure.mgmt.frontdoor.models.BackendPoolsSettings - :param enabled_state: Operational status of the Front Door load balancer. - Permitted values are 'Enabled' or 'Disabled'. Possible values include: - 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState - :param resource_state: Resource status of the Front Door. Possible values - include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', - 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :ivar resource_state: Resource status of the Front Door. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState :ivar provisioning_state: Provisioning state of the Front Door. :vartype provisioning_state: str :ivar cname: The host that each frontendEndpoint must CNAME to. :vartype cname: str + :ivar frontdoor_id: The Id of the frontdoor. + :vartype frontdoor_id: str + :ivar rules_engines: Rules Engine Configurations available to routing rules. + :vartype rules_engines: list[~azure.mgmt.frontdoor.models.RulesEngine] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'cname': {'readonly': True}, + 'frontdoor_id': {'readonly': True}, + 'rules_engines': {'readonly': True}, } _attribute_map = { @@ -889,9 +982,14 @@ class FrontDoor(Resource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cname': {'key': 'properties.cname', 'type': 'str'}, + 'frontdoor_id': {'key': 'properties.frontdoorId', 'type': 'str'}, + 'rules_engines': {'key': 'properties.rulesEngines', 'type': '[RulesEngine]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontDoor, self).__init__(**kwargs) self.friendly_name = kwargs.get('friendly_name', None) self.routing_rules = kwargs.get('routing_rules', None) @@ -901,39 +999,63 @@ def __init__(self, **kwargs): self.frontend_endpoints = kwargs.get('frontend_endpoints', None) self.backend_pools_settings = kwargs.get('backend_pools_settings', None) self.enabled_state = kwargs.get('enabled_state', None) - self.resource_state = kwargs.get('resource_state', None) + self.resource_state = None self.provisioning_state = None self.cname = None + self.frontdoor_id = None + self.rules_engines = None + + +class FrontDoorListResult(msrest.serialization.Model): + """Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Front Doors within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.FrontDoor] + :param next_link: URL to get the next set of Front Door objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontDoor]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontDoorListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) -class FrontDoorUpdateParameters(Model): +class FrontDoorUpdateParameters(msrest.serialization.Model): """The properties needed to update a Front Door. - :param friendly_name: A friendly name for the frontDoor + :param friendly_name: A friendly name for the frontDoor. :type friendly_name: str :param routing_rules: Routing rules associated with this Front Door. :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param load_balancing_settings: Load balancing settings associated with - this Front Door instance. - :type load_balancing_settings: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param health_probe_settings: Health probe settings associated with this - Front Door instance. - :type health_probe_settings: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] :param backend_pools: Backend pools available to routing rules. :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] :param frontend_endpoints: Frontend endpoints available to routing rules. - :type frontend_endpoints: - list[~azure.mgmt.frontdoor.models.FrontendEndpoint] - :param backend_pools_settings: Settings for all backendPools - :type backend_pools_settings: - ~azure.mgmt.frontdoor.models.BackendPoolsSettings - :param enabled_state: Operational status of the Front Door load balancer. - Permitted values are 'Enabled' or 'Disabled'. Possible values include: - 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState """ _attribute_map = { @@ -947,7 +1069,10 @@ class FrontDoorUpdateParameters(Model): 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontDoorUpdateParameters, self).__init__(**kwargs) self.friendly_name = kwargs.get('friendly_name', None) self.routing_rules = kwargs.get('routing_rules', None) @@ -959,68 +1084,134 @@ def __init__(self, **kwargs): self.enabled_state = kwargs.get('enabled_state', None) +class FrontDoorProperties(FrontDoorUpdateParameters): + """The JSON object that contains the properties required to create an endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param friendly_name: A friendly name for the frontDoor. + :type friendly_name: str + :param routing_rules: Routing rules associated with this Front Door. + :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param backend_pools: Backend pools available to routing rules. + :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] + :param frontend_endpoints: Frontend endpoints available to routing rules. + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :ivar resource_state: Resource status of the Front Door. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar provisioning_state: Provisioning state of the Front Door. + :vartype provisioning_state: str + :ivar cname: The host that each frontendEndpoint must CNAME to. + :vartype cname: str + :ivar frontdoor_id: The Id of the frontdoor. + :vartype frontdoor_id: str + :ivar rules_engines: Rules Engine Configurations available to routing rules. + :vartype rules_engines: list[~azure.mgmt.frontdoor.models.RulesEngine] + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'cname': {'readonly': True}, + 'frontdoor_id': {'readonly': True}, + 'rules_engines': {'readonly': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'routing_rules': {'key': 'routingRules', 'type': '[RoutingRule]'}, + 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': '[LoadBalancingSettingsModel]'}, + 'health_probe_settings': {'key': 'healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, + 'backend_pools': {'key': 'backendPools', 'type': '[BackendPool]'}, + 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'backendPoolsSettings', 'type': 'BackendPoolsSettings'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'frontdoor_id': {'key': 'frontdoorId', 'type': 'str'}, + 'rules_engines': {'key': 'rulesEngines', 'type': '[RulesEngine]'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontDoorProperties, self).__init__(**kwargs) + self.resource_state = None + self.provisioning_state = None + self.cname = None + self.frontdoor_id = None + self.rules_engines = None + + class FrontendEndpoint(SubResource): """A frontend endpoint used for routing. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param host_name: The host name of the frontendEndpoint. Must be a domain - name. + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param host_name: The host name of the frontendEndpoint. Must be a domain name. :type host_name: str - :param session_affinity_enabled_state: Whether to allow session affinity - on this host. Valid options are 'Enabled' or 'Disabled'. Possible values - include: 'Enabled', 'Disabled' + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :type session_affinity_enabled_state: str or ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState - :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. - The TTL to use in seconds for session affinity, if applicable. + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. :type session_affinity_ttl_seconds: int - :param web_application_firewall_policy_link: Defines the Web Application - Firewall policy for each host (if applicable) + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). :type web_application_firewall_policy_link: ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState - :ivar custom_https_provisioning_state: Provisioning status of Custom Https - of the frontendEndpoint. Possible values include: 'Enabling', 'Enabled', - 'Disabling', 'Disabled', 'Failed' + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https of the + frontendEndpoint. Possible values include: "Enabling", "Enabled", "Disabling", "Disabled", + "Failed". :vartype custom_https_provisioning_state: str or ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningState - :ivar custom_https_provisioning_substate: Provisioning substate shows the - progress of custom HTTPS enabling/disabling process step by step. Possible - values include: 'SubmittingDomainControlValidationRequest', - 'PendingDomainControlValidationREquestApproval', - 'DomainControlValidationRequestApproved', - 'DomainControlValidationRequestRejected', - 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', - 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - 'CertificateDeleted' + :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom + HTTPS enabling/disabling process step by step. Possible values include: + "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", + "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", + "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", + "CertificateDeployed", "DeletingCertificate", "CertificateDeleted". :vartype custom_https_provisioning_substate: str or ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningSubstate - :ivar custom_https_configuration: The configuration specifying how to - enable HTTPS - :vartype custom_https_configuration: - ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration - :param name: Resource name. - :type name: str - :ivar type: Resource type. - :vartype type: str + :ivar custom_https_configuration: The configuration specifying how to enable HTTPS. + :vartype custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration """ _validation = { + 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'custom_https_provisioning_state': {'readonly': True}, 'custom_https_provisioning_substate': {'readonly': True}, 'custom_https_configuration': {'readonly': True}, - 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'session_affinity_enabled_state': {'key': 'properties.sessionAffinityEnabledState', 'type': 'str'}, 'session_affinity_ttl_seconds': {'key': 'properties.sessionAffinityTtlSeconds', 'type': 'int'}, @@ -1029,25 +1220,26 @@ class FrontendEndpoint(SubResource): 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, 'custom_https_configuration': {'key': 'properties.customHttpsConfiguration', 'type': 'CustomHttpsConfiguration'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontendEndpoint, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None self.host_name = kwargs.get('host_name', None) self.session_affinity_enabled_state = kwargs.get('session_affinity_enabled_state', None) self.session_affinity_ttl_seconds = kwargs.get('session_affinity_ttl_seconds', None) self.web_application_firewall_policy_link = kwargs.get('web_application_firewall_policy_link', None) - self.resource_state = kwargs.get('resource_state', None) + self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None self.custom_https_configuration = None - self.name = kwargs.get('name', None) - self.type = None -class FrontendEndpointLink(Model): +class FrontendEndpointLink(msrest.serialization.Model): """Defines the Resource ID for a Frontend Endpoint. :param id: Resource ID. @@ -1058,27 +1250,28 @@ class FrontendEndpointLink(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontendEndpointLink, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class FrontendEndpointUpdateParameters(Model): +class FrontendEndpointUpdateParameters(msrest.serialization.Model): """Frontend endpoint used in routing rule. - :param host_name: The host name of the frontendEndpoint. Must be a domain - name. + :param host_name: The host name of the frontendEndpoint. Must be a domain name. :type host_name: str - :param session_affinity_enabled_state: Whether to allow session affinity - on this host. Valid options are 'Enabled' or 'Disabled'. Possible values - include: 'Enabled', 'Disabled' + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :type session_affinity_enabled_state: str or ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState - :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. - The TTL to use in seconds for session affinity, if applicable. + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. :type session_affinity_ttl_seconds: int - :param web_application_firewall_policy_link: Defines the Web Application - Firewall policy for each host (if applicable) + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). :type web_application_firewall_policy_link: ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink """ @@ -1090,7 +1283,10 @@ class FrontendEndpointUpdateParameters(Model): 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontendEndpointUpdateParameters, self).__init__(**kwargs) self.host_name = kwargs.get('host_name', None) self.session_affinity_enabled_state = kwargs.get('session_affinity_enabled_state', None) @@ -1098,7 +1294,103 @@ def __init__(self, **kwargs): self.web_application_firewall_policy_link = kwargs.get('web_application_firewall_policy_link', None) -class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(Model): +class FrontendEndpointProperties(FrontendEndpointUpdateParameters): + """The JSON object that contains the properties required to create a frontend endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param host_name: The host name of the frontendEndpoint. Must be a domain name. + :type host_name: str + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type session_affinity_enabled_state: str or + ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. + :type session_affinity_ttl_seconds: int + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https of the + frontendEndpoint. Possible values include: "Enabling", "Enabled", "Disabling", "Disabled", + "Failed". + :vartype custom_https_provisioning_state: str or + ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningState + :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom + HTTPS enabling/disabling process step by step. Possible values include: + "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", + "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", + "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", + "CertificateDeployed", "DeletingCertificate", "CertificateDeleted". + :vartype custom_https_provisioning_substate: str or + ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningSubstate + :ivar custom_https_configuration: The configuration specifying how to enable HTTPS. + :vartype custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'custom_https_provisioning_state': {'readonly': True}, + 'custom_https_provisioning_substate': {'readonly': True}, + 'custom_https_configuration': {'readonly': True}, + } + + _attribute_map = { + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'session_affinity_enabled_state': {'key': 'sessionAffinityEnabledState', 'type': 'str'}, + 'session_affinity_ttl_seconds': {'key': 'sessionAffinityTtlSeconds', 'type': 'int'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'custom_https_provisioning_state': {'key': 'customHttpsProvisioningState', 'type': 'str'}, + 'custom_https_provisioning_substate': {'key': 'customHttpsProvisioningSubstate', 'type': 'str'}, + 'custom_https_configuration': {'key': 'customHttpsConfiguration', 'type': 'CustomHttpsConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontendEndpointProperties, self).__init__(**kwargs) + self.resource_state = None + self.custom_https_provisioning_state = None + self.custom_https_provisioning_substate = None + self.custom_https_configuration = None + + +class FrontendEndpointsListResult(msrest.serialization.Model): + """Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Frontend endpoints within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param next_link: URL to get the next set of frontend endpoints if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontendEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontendEndpointsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(msrest.serialization.Model): """Defines the Web Application Firewall policy for each host (if applicable). :param id: Resource ID. @@ -1109,23 +1401,58 @@ class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class HealthProbeSettingsListResult(Model): - """Result of the request to list HealthProbeSettings. It contains a list of - HealthProbeSettings objects and a URL link to get the next set of results. +class HeaderAction(msrest.serialization.Model): + """An action that can manipulate an http header. + + All required parameters must be populated in order to send to Azure. + + :param header_action_type: Required. Which type of manipulation to apply to the header. + Possible values include: "Append", "Delete", "Overwrite". + :type header_action_type: str or ~azure.mgmt.frontdoor.models.HeaderActionType + :param header_name: Required. The name of the header this action will apply to. + :type header_name: str + :param value: The value to update the given header name with. This value is not used if the + actionType is Delete. + :type value: str + """ + + _validation = { + 'header_action_type': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'header_action_type': {'key': 'headerActionType', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HeaderAction, self).__init__(**kwargs) + self.header_action_type = kwargs['header_action_type'] + self.header_name = kwargs['header_name'] + self.value = kwargs.get('value', None) + + +class HealthProbeSettingsListResult(msrest.serialization.Model): + """Result of the request to list HealthProbeSettings. It contains a list of HealthProbeSettings objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of HealthProbeSettings within a Front Door. - :vartype value: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] - :param next_link: URL to get the next set of HealthProbeSettings objects - if there are any. + :vartype value: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param next_link: URL to get the next set of HealthProbeSettings objects if there are any. :type next_link: str """ @@ -1138,7 +1465,10 @@ class HealthProbeSettingsListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(HealthProbeSettingsListResult, self).__init__(**kwargs) self.value = None self.next_link = kwargs.get('next_link', None) @@ -1147,88 +1477,82 @@ def __init__(self, **kwargs): class HealthProbeSettingsModel(SubResource): """Load balancing settings for a backend pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param path: The path to use for the health probe. Default is / - :type path: str - :param protocol: Protocol scheme to use for this probe. Possible values - include: 'Http', 'Https' - :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol - :param interval_in_seconds: The number of seconds between health probes. - :type interval_in_seconds: int - :param health_probe_method: Configures which HTTP method to use to probe - the backends defined under backendPools. Possible values include: 'GET', - 'HEAD'. Default value: "HEAD" . - :type health_probe_method: str or - ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod - :param enabled_state: Whether to enable health probes to be made against - backends defined under backendPools. Health probes can only be disabled if - there is a single enabled backend in single enabled backend pool. Possible - values include: 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.HealthProbeEnabled - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str - """ - + :param path: The path to use for the health probe. Default is /. + :type path: str + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". + :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol + :param interval_in_seconds: The number of seconds between health probes. + :type interval_in_seconds: int + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, 'protocol': {'key': 'properties.protocol', 'type': 'str'}, 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, 'health_probe_method': {'key': 'properties.healthProbeMethod', 'type': 'str'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(HealthProbeSettingsModel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None self.path = kwargs.get('path', None) self.protocol = kwargs.get('protocol', None) self.interval_in_seconds = kwargs.get('interval_in_seconds', None) self.health_probe_method = kwargs.get('health_probe_method', "HEAD") self.enabled_state = kwargs.get('enabled_state', None) - self.resource_state = kwargs.get('resource_state', None) - self.name = kwargs.get('name', None) - self.type = None + self.resource_state = None -class HealthProbeSettingsUpdateParameters(Model): +class HealthProbeSettingsUpdateParameters(msrest.serialization.Model): """L7 health probe settings for a backend pool. - :param path: The path to use for the health probe. Default is / + :param path: The path to use for the health probe. Default is /. :type path: str - :param protocol: Protocol scheme to use for this probe. Possible values - include: 'Http', 'Https' + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol :param interval_in_seconds: The number of seconds between health probes. :type interval_in_seconds: int - :param health_probe_method: Configures which HTTP method to use to probe - the backends defined under backendPools. Possible values include: 'GET', - 'HEAD'. Default value: "HEAD" . - :type health_probe_method: str or - ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod - :param enabled_state: Whether to enable health probes to be made against - backends defined under backendPools. Health probes can only be disabled if - there is a single enabled backend in single enabled backend pool. Possible - values include: 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled """ _attribute_map = { @@ -1239,7 +1563,10 @@ class HealthProbeSettingsUpdateParameters(Model): 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(HealthProbeSettingsUpdateParameters, self).__init__(**kwargs) self.path = kwargs.get('path', None) self.protocol = kwargs.get('protocol', None) @@ -1248,7 +1575,52 @@ def __init__(self, **kwargs): self.enabled_state = kwargs.get('enabled_state', None) -class KeyVaultCertificateSourceParametersVault(Model): +class HealthProbeSettingsProperties(HealthProbeSettingsUpdateParameters): + """The JSON object that contains the properties required to create a health probe settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param path: The path to use for the health probe. Default is /. + :type path: str + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". + :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol + :param interval_in_seconds: The number of seconds between health probes. + :type interval_in_seconds: int + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'health_probe_method': {'key': 'healthProbeMethod', 'type': 'str'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HealthProbeSettingsProperties, self).__init__(**kwargs) + self.resource_state = None + + +class KeyVaultCertificateSourceParametersVault(msrest.serialization.Model): """The Key Vault containing the SSL certificate. :param id: Resource ID. @@ -1259,40 +1631,38 @@ class KeyVaultCertificateSourceParametersVault(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(KeyVaultCertificateSourceParametersVault, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class LatencyMetric(Model): +class LatencyMetric(msrest.serialization.Model): """Defines the properties of a latency metric used in the latency scorecard. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the Latency Metric + :ivar name: The name of the Latency Metric. :vartype name: str - :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC + :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC. :vartype end_date_time_utc: str - :ivar a_value: The metric value of the A endpoint + :ivar a_value: The metric value of the A endpoint. :vartype a_value: float - :ivar b_value: The metric value of the B endpoint + :ivar b_value: The metric value of the B endpoint. :vartype b_value: float - :ivar delta: The difference in value between endpoint A and B + :ivar delta: The difference in value between endpoint A and B. :vartype delta: float - :ivar delta_percent: The percent difference between endpoint A and B + :ivar delta_percent: The percent difference between endpoint A and B. :vartype delta_percent: float - :ivar a_clower95_ci: The lower end of the 95% confidence interval for - endpoint A - :vartype a_clower95_ci: float - :ivar a_hupper95_ci: The upper end of the 95% confidence interval for - endpoint A - :vartype a_hupper95_ci: float - :ivar b_clower95_ci: The lower end of the 95% confidence interval for - endpoint B - :vartype b_clower95_ci: float - :ivar b_upper95_ci: The upper end of the 95% confidence interval for - endpoint B + :ivar a_c_lower95_ci: The lower end of the 95% confidence interval for endpoint A. + :vartype a_c_lower95_ci: float + :ivar a_h_upper95_ci: The upper end of the 95% confidence interval for endpoint A. + :vartype a_h_upper95_ci: float + :ivar b_c_lower95_ci: The lower end of the 95% confidence interval for endpoint B. + :vartype b_c_lower95_ci: float + :ivar b_upper95_ci: The upper end of the 95% confidence interval for endpoint B. :vartype b_upper95_ci: float """ @@ -1303,9 +1673,9 @@ class LatencyMetric(Model): 'b_value': {'readonly': True}, 'delta': {'readonly': True}, 'delta_percent': {'readonly': True}, - 'a_clower95_ci': {'readonly': True}, - 'a_hupper95_ci': {'readonly': True}, - 'b_clower95_ci': {'readonly': True}, + 'a_c_lower95_ci': {'readonly': True}, + 'a_h_upper95_ci': {'readonly': True}, + 'b_c_lower95_ci': {'readonly': True}, 'b_upper95_ci': {'readonly': True}, } @@ -1316,13 +1686,16 @@ class LatencyMetric(Model): 'b_value': {'key': 'bValue', 'type': 'float'}, 'delta': {'key': 'delta', 'type': 'float'}, 'delta_percent': {'key': 'deltaPercent', 'type': 'float'}, - 'a_clower95_ci': {'key': 'aCLower95CI', 'type': 'float'}, - 'a_hupper95_ci': {'key': 'aHUpper95CI', 'type': 'float'}, - 'b_clower95_ci': {'key': 'bCLower95CI', 'type': 'float'}, + 'a_c_lower95_ci': {'key': 'aCLower95CI', 'type': 'float'}, + 'a_h_upper95_ci': {'key': 'aHUpper95CI', 'type': 'float'}, + 'b_c_lower95_ci': {'key': 'bCLower95CI', 'type': 'float'}, 'b_upper95_ci': {'key': 'bUpper95CI', 'type': 'float'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LatencyMetric, self).__init__(**kwargs) self.name = None self.end_date_time_utc = None @@ -1330,17 +1703,16 @@ def __init__(self, **kwargs): self.b_value = None self.delta = None self.delta_percent = None - self.a_clower95_ci = None - self.a_hupper95_ci = None - self.b_clower95_ci = None + self.a_c_lower95_ci = None + self.a_h_upper95_ci = None + self.b_c_lower95_ci = None self.b_upper95_ci = None class LatencyScorecard(Resource): """Defines the LatencyScorecard. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1350,27 +1722,26 @@ class LatencyScorecard(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar latency_scorecard_id: The unique identifier of the Latency Scorecard - :vartype latency_scorecard_id: str - :ivar latency_scorecard_name: The name of the Latency Scorecard - :vartype latency_scorecard_name: str - :ivar description: The description of the Latency Scorecard + :ivar id_properties_id: The unique identifier of the Latency Scorecard. + :vartype id_properties_id: str + :ivar name_properties_name: The name of the Latency Scorecard. + :vartype name_properties_name: str + :ivar description: The description of the Latency Scorecard. :vartype description: str - :ivar endpoint_a: The A endpoint in the scorecard + :ivar endpoint_a: The A endpoint in the scorecard. :vartype endpoint_a: str - :ivar endpoint_b: The B endpoint in the scorecard + :ivar endpoint_b: The B endpoint in the scorecard. :vartype endpoint_b: str - :ivar start_date_time_utc: The start time of the Latency Scorecard in UTC - :vartype start_date_time_utc: datetime - :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC - :vartype end_date_time_utc: datetime - :ivar country: The country associated with the Latency Scorecard. Values - are country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :ivar start_date_time_utc: The start time of the Latency Scorecard in UTC. + :vartype start_date_time_utc: ~datetime.datetime + :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC. + :vartype end_date_time_utc: ~datetime.datetime + :ivar country: The country associated with the Latency Scorecard. Values are country ISO codes + as specified here- https://www.iso.org/iso-3166-country-codes.html. :vartype country: str - :param latency_metrics: The latency metrics of the Latency Scorecard + :param latency_metrics: The latency metrics of the Latency Scorecard. :type latency_metrics: list[~azure.mgmt.frontdoor.models.LatencyMetric] """ @@ -1378,8 +1749,8 @@ class LatencyScorecard(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'latency_scorecard_id': {'readonly': True}, - 'latency_scorecard_name': {'readonly': True}, + 'id_properties_id': {'readonly': True}, + 'name_properties_name': {'readonly': True}, 'description': {'readonly': True}, 'endpoint_a': {'readonly': True}, 'endpoint_b': {'readonly': True}, @@ -1394,8 +1765,8 @@ class LatencyScorecard(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'latency_scorecard_id': {'key': 'properties.id', 'type': 'str'}, - 'latency_scorecard_name': {'key': 'properties.name', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'endpoint_a': {'key': 'properties.endpointA', 'type': 'str'}, 'endpoint_b': {'key': 'properties.endpointB', 'type': 'str'}, @@ -1405,10 +1776,13 @@ class LatencyScorecard(Resource): 'latency_metrics': {'key': 'properties.latencyMetrics', 'type': '[LatencyMetric]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LatencyScorecard, self).__init__(**kwargs) - self.latency_scorecard_id = None - self.latency_scorecard_name = None + self.id_properties_id = None + self.name_properties_name = None self.description = None self.endpoint_a = None self.endpoint_b = None @@ -1418,19 +1792,14 @@ def __init__(self, **kwargs): self.latency_metrics = kwargs.get('latency_metrics', None) -class LoadBalancingSettingsListResult(Model): - """Result of the request to list load balancing settings. It contains a list - of load balancing settings objects and a URL link to get the next set of - results. +class LoadBalancingSettingsListResult(msrest.serialization.Model): + """Result of the request to list load balancing settings. It contains a list of load balancing settings objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Backend Pools within a Front Door. - :vartype value: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param next_link: URL to get the next set of LoadBalancingSettings objects - if there are any. + :vartype value: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param next_link: URL to get the next set of LoadBalancingSettings objects if there are any. :type next_link: str """ @@ -1443,7 +1812,10 @@ class LoadBalancingSettingsListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LoadBalancingSettingsListResult, self).__init__(**kwargs) self.value = None self.next_link = kwargs.get('next_link', None) @@ -1452,65 +1824,65 @@ def __init__(self, **kwargs): class LoadBalancingSettingsModel(SubResource): """Load balancing settings for a backend pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param sample_size: The number of samples to consider for load balancing - decisions - :type sample_size: int - :param successful_samples_required: The number of samples within the - sample period that must succeed - :type successful_samples_required: int - :param additional_latency_milliseconds: The additional latency in - milliseconds for probes to fall into the lowest latency bucket - :type additional_latency_milliseconds: int - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str + :param sample_size: The number of samples to consider for load balancing decisions. + :type sample_size: int + :param successful_samples_required: The number of samples within the sample period that must + succeed. + :type successful_samples_required: int + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. + :type additional_latency_milliseconds: int + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'sample_size': {'key': 'properties.sampleSize', 'type': 'int'}, 'successful_samples_required': {'key': 'properties.successfulSamplesRequired', 'type': 'int'}, 'additional_latency_milliseconds': {'key': 'properties.additionalLatencyMilliseconds', 'type': 'int'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LoadBalancingSettingsModel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None self.sample_size = kwargs.get('sample_size', None) self.successful_samples_required = kwargs.get('successful_samples_required', None) self.additional_latency_milliseconds = kwargs.get('additional_latency_milliseconds', None) - self.resource_state = kwargs.get('resource_state', None) - self.name = kwargs.get('name', None) - self.type = None + self.resource_state = None -class LoadBalancingSettingsUpdateParameters(Model): +class LoadBalancingSettingsUpdateParameters(msrest.serialization.Model): """Round-Robin load balancing settings for a backend pool. - :param sample_size: The number of samples to consider for load balancing - decisions + :param sample_size: The number of samples to consider for load balancing decisions. :type sample_size: int - :param successful_samples_required: The number of samples within the - sample period that must succeed + :param successful_samples_required: The number of samples within the sample period that must + succeed. :type successful_samples_required: int - :param additional_latency_milliseconds: The additional latency in - milliseconds for probes to fall into the lowest latency bucket + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. :type additional_latency_milliseconds: int """ @@ -1520,28 +1892,65 @@ class LoadBalancingSettingsUpdateParameters(Model): 'additional_latency_milliseconds': {'key': 'additionalLatencyMilliseconds', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LoadBalancingSettingsUpdateParameters, self).__init__(**kwargs) self.sample_size = kwargs.get('sample_size', None) self.successful_samples_required = kwargs.get('successful_samples_required', None) self.additional_latency_milliseconds = kwargs.get('additional_latency_milliseconds', None) -class ManagedRuleDefinition(Model): +class LoadBalancingSettingsProperties(LoadBalancingSettingsUpdateParameters): + """The JSON object that contains the properties required to create load balancing settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param sample_size: The number of samples to consider for load balancing decisions. + :type sample_size: int + :param successful_samples_required: The number of samples within the sample period that must + succeed. + :type successful_samples_required: int + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. + :type additional_latency_milliseconds: int + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'sample_size': {'key': 'sampleSize', 'type': 'int'}, + 'successful_samples_required': {'key': 'successfulSamplesRequired', 'type': 'int'}, + 'additional_latency_milliseconds': {'key': 'additionalLatencyMilliseconds', 'type': 'int'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancingSettingsProperties, self).__init__(**kwargs) + self.resource_state = None + + +class ManagedRuleDefinition(msrest.serialization.Model): """Describes a managed rule definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar rule_id: Identifier for the managed rule. :vartype rule_id: str - :ivar default_state: Describes the default state for the managed rule. - Possible values include: 'Disabled', 'Enabled' - :vartype default_state: str or - ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState - :ivar default_action: Describes the default action to be applied when the - managed rule matches. Possible values include: 'Allow', 'Block', 'Log', - 'Redirect' + :ivar default_state: Describes the default state for the managed rule. Possible values include: + "Disabled", "Enabled". + :vartype default_state: str or ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :ivar default_action: Describes the default action to be applied when the managed rule matches. + Possible values include: "Allow", "Block", "Log", "Redirect". :vartype default_action: str or ~azure.mgmt.frontdoor.models.ActionType :ivar description: Describes the functionality of the managed rule. :vartype description: str @@ -1561,7 +1970,10 @@ class ManagedRuleDefinition(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleDefinition, self).__init__(**kwargs) self.rule_id = None self.default_state = None @@ -1569,24 +1981,22 @@ def __init__(self, **kwargs): self.description = None -class ManagedRuleExclusion(Model): +class ManagedRuleExclusion(msrest.serialization.Model): """Exclude variables from managed rule evaluation. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. The variable type to be excluded. - Possible values include: 'RequestHeaderNames', 'RequestCookieNames', - 'QueryStringArgNames', 'RequestBodyPostArgNames' - :type match_variable: str or - ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable - :param selector_match_operator: Required. Comparison operator to apply to - the selector when specifying which elements in the collection this - exclusion applies to. Possible values include: 'Equals', 'Contains', - 'StartsWith', 'EndsWith', 'EqualsAny' + :param match_variable: Required. The variable type to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "QueryStringArgNames", "RequestBodyPostArgNames", + "RequestBodyJsonArgNames". + :type match_variable: str or ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable + :param selector_match_operator: Required. Comparison operator to apply to the selector when + specifying which elements in the collection this exclusion applies to. Possible values include: + "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". :type selector_match_operator: str or ~azure.mgmt.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator - :param selector: Required. Selector value for which elements in the - collection this exclusion applies to. + :param selector: Required. Selector value for which elements in the collection this exclusion + applies to. :type selector: str """ @@ -1602,18 +2012,20 @@ class ManagedRuleExclusion(Model): 'selector': {'key': 'selector', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleExclusion, self).__init__(**kwargs) - self.match_variable = kwargs.get('match_variable', None) - self.selector_match_operator = kwargs.get('selector_match_operator', None) - self.selector = kwargs.get('selector', None) + self.match_variable = kwargs['match_variable'] + self.selector_match_operator = kwargs['selector_match_operator'] + self.selector = kwargs['selector'] -class ManagedRuleGroupDefinition(Model): +class ManagedRuleGroupDefinition(msrest.serialization.Model): """Describes a managed rule group. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar rule_group_name: Name of the managed rule group. :vartype rule_group_name: str @@ -1635,26 +2047,27 @@ class ManagedRuleGroupDefinition(Model): 'rules': {'key': 'rules', 'type': '[ManagedRuleDefinition]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleGroupDefinition, self).__init__(**kwargs) self.rule_group_name = None self.description = None self.rules = None -class ManagedRuleGroupOverride(Model): +class ManagedRuleGroupOverride(msrest.serialization.Model): """Defines a managed rule group override setting. All required parameters must be populated in order to send to Azure. - :param rule_group_name: Required. Describes the managed rule group to - override. + :param rule_group_name: Required. Describes the managed rule group to override. :type rule_group_name: str - :param exclusions: Describes the exclusions that are applied to all rules - in the group. + :param exclusions: Describes the exclusions that are applied to all rules in the group. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] - :param rules: List of rules that will be disabled. If none specified, all - rules in the group will be disabled. + :param rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. :type rules: list[~azure.mgmt.frontdoor.models.ManagedRuleOverride] """ @@ -1668,30 +2081,30 @@ class ManagedRuleGroupOverride(Model): 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleGroupOverride, self).__init__(**kwargs) - self.rule_group_name = kwargs.get('rule_group_name', None) + self.rule_group_name = kwargs['rule_group_name'] self.exclusions = kwargs.get('exclusions', None) self.rules = kwargs.get('rules', None) -class ManagedRuleOverride(Model): +class ManagedRuleOverride(msrest.serialization.Model): """Defines a managed rule group override setting. All required parameters must be populated in order to send to Azure. :param rule_id: Required. Identifier for the managed rule. :type rule_id: str - :param enabled_state: Describes if the managed rule is in enabled or - disabled state. Defaults to Disabled if not specified. Possible values - include: 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState - :param action: Describes the override action to be applied when rule - matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :param enabled_state: Describes if the managed rule is in enabled or disabled state. Defaults + to Disabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :param action: Describes the override action to be applied when rule matches. Possible values + include: "Allow", "Block", "Log", "Redirect". :type action: str or ~azure.mgmt.frontdoor.models.ActionType - :param exclusions: Describes the exclusions that are applied to this - specific rule. + :param exclusions: Describes the exclusions that are applied to this specific rule. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] """ @@ -1706,31 +2119,33 @@ class ManagedRuleOverride(Model): 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleOverride, self).__init__(**kwargs) - self.rule_id = kwargs.get('rule_id', None) + self.rule_id = kwargs['rule_id'] self.enabled_state = kwargs.get('enabled_state', None) self.action = kwargs.get('action', None) self.exclusions = kwargs.get('exclusions', None) -class ManagedRuleSet(Model): +class ManagedRuleSet(msrest.serialization.Model): """Defines a managed rule set. All required parameters must be populated in order to send to Azure. :param rule_set_type: Required. Defines the rule set type to use. :type rule_set_type: str - :param rule_set_version: Required. Defines the version of the rule set to - use. + :param rule_set_version: Required. Defines the version of the rule set to use. :type rule_set_version: str - :param exclusions: Describes the exclusions that are applied to all rules - in the set. + :param rule_set_action: Defines the action to take when a managed rule set score threshold is + met. Possible values include: "Block", "Log", "Redirect". + :type rule_set_action: str or ~azure.mgmt.frontdoor.models.ManagedRuleSetActionType + :param exclusions: Describes the exclusions that are applied to all rules in the set. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] - :param rule_group_overrides: Defines the rule group overrides to apply to - the rule set. - :type rule_group_overrides: - list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] + :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :type rule_group_overrides: list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] """ _validation = { @@ -1741,14 +2156,19 @@ class ManagedRuleSet(Model): _attribute_map = { 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_set_action': {'key': 'ruleSetAction', 'type': 'str'}, 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleSet, self).__init__(**kwargs) - self.rule_set_type = kwargs.get('rule_set_type', None) - self.rule_set_version = kwargs.get('rule_set_version', None) + self.rule_set_type = kwargs['rule_set_type'] + self.rule_set_version = kwargs['rule_set_version'] + self.rule_set_action = kwargs.get('rule_set_action', None) self.exclusions = kwargs.get('exclusions', None) self.rule_group_overrides = kwargs.get('rule_group_overrides', None) @@ -1756,8 +2176,7 @@ def __init__(self, **kwargs): class ManagedRuleSetDefinition(Resource): """Describes the a managed rule set definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1767,17 +2186,18 @@ class ManagedRuleSetDefinition(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :ivar provisioning_state: Provisioning state of the managed rule set. :vartype provisioning_state: str + :ivar rule_set_id: Id of the managed rule set. + :vartype rule_set_id: str :ivar rule_set_type: Type of the managed rule set. :vartype rule_set_type: str :ivar rule_set_version: Version of the managed rule set type. :vartype rule_set_version: str :ivar rule_groups: Rule groups of the managed rule set. - :vartype rule_groups: - list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] + :vartype rule_groups: list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] """ _validation = { @@ -1785,6 +2205,7 @@ class ManagedRuleSetDefinition(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'rule_set_id': {'readonly': True}, 'rule_set_type': {'readonly': True}, 'rule_set_version': {'readonly': True}, 'rule_groups': {'readonly': True}, @@ -1797,20 +2218,54 @@ class ManagedRuleSetDefinition(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_id': {'key': 'properties.ruleSetId', 'type': 'str'}, 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ManagedRuleGroupDefinition]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleSetDefinition, self).__init__(**kwargs) self.provisioning_state = None + self.rule_set_id = None self.rule_set_type = None self.rule_set_version = None self.rule_groups = None -class ManagedRuleSetList(Model): +class ManagedRuleSetDefinitionList(msrest.serialization.Model): + """List of managed rule set definitions available for use in a policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of managed rule set definitions. + :vartype value: list[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinition] + :param next_link: URL to retrieve next set of managed rule set definitions. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedRuleSetDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedRuleSetDefinitionList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class ManagedRuleSetList(msrest.serialization.Model): """Defines the list of managed rule sets for the policy. :param managed_rule_sets: List of rule sets. @@ -1821,31 +2276,31 @@ class ManagedRuleSetList(Model): 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedRuleSetList, self).__init__(**kwargs) self.managed_rule_sets = kwargs.get('managed_rule_sets', None) -class MatchCondition(Model): +class MatchCondition(msrest.serialization.Model): """Define a match condition. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. Request variable to compare with. - Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', - 'PostArgs', 'RequestUri', 'RequestHeader', 'RequestBody', 'Cookies', - 'SocketAddr' + :param match_variable: Required. Request variable to compare with. Possible values include: + "RemoteAddr", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", + "RequestBody", "Cookies", "SocketAddr". :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchVariable - :param selector: Match against a specific key from the QueryString, - PostArgs, RequestHeader or Cookies variables. Default is null. + :param selector: Match against a specific key from the QueryString, PostArgs, RequestHeader or + Cookies variables. Default is null. :type selector: str - :param operator: Required. Comparison type to use for matching with the - variable value. Possible values include: 'Any', 'IPMatch', 'GeoMatch', - 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', - 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' + :param operator: Required. Comparison type to use for matching with the variable value. + Possible values include: "Any", "IPMatch", "GeoMatch", "Equal", "Contains", "LessThan", + "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", "BeginsWith", "EndsWith", "RegEx". :type operator: str or ~azure.mgmt.frontdoor.models.Operator - :param negate_condition: Describes if the result of this condition should - be negated. + :param negate_condition: Describes if the result of this condition should be negated. :type negate_condition: bool :param match_value: Required. List of possible match values. :type match_value: list[str] @@ -1868,37 +2323,40 @@ class MatchCondition(Model): 'transforms': {'key': 'transforms', 'type': '[str]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(MatchCondition, self).__init__(**kwargs) - self.match_variable = kwargs.get('match_variable', None) + self.match_variable = kwargs['match_variable'] self.selector = kwargs.get('selector', None) - self.operator = kwargs.get('operator', None) + self.operator = kwargs['operator'] self.negate_condition = kwargs.get('negate_condition', None) - self.match_value = kwargs.get('match_value', None) + self.match_value = kwargs['match_value'] self.transforms = kwargs.get('transforms', None) -class PolicySettings(Model): +class PolicySettings(msrest.serialization.Model): """Defines top-level WebApplicationFirewallPolicy configuration settings. - :param enabled_state: Describes if the policy is in enabled or disabled - state. Defaults to Enabled if not specified. Possible values include: - 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.PolicyEnabledState - :param mode: Describes if it is in detection mode or prevention mode at - policy level. Possible values include: 'Prevention', 'Detection' + :param enabled_state: Describes if the policy is in enabled or disabled state. Defaults to + Enabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.PolicyEnabledState + :param mode: Describes if it is in detection mode or prevention mode at policy level. Possible + values include: "Prevention", "Detection". :type mode: str or ~azure.mgmt.frontdoor.models.PolicyMode - :param redirect_url: If action type is redirect, this field represents - redirect URL for the client. + :param redirect_url: If action type is redirect, this field represents redirect URL for the + client. :type redirect_url: str - :param custom_block_response_status_code: If the action type is block, - customer can override the response status code. + :param custom_block_response_status_code: If the action type is block, customer can override + the response status code. :type custom_block_response_status_code: int - :param custom_block_response_body: If the action type is block, customer - can override the response body. The body must be specified in base64 - encoding. + :param custom_block_response_body: If the action type is block, customer can override the + response body. The body must be specified in base64 encoding. :type custom_block_response_body: str + :param request_body_check: Describes if policy managed rules will inspect the request body + content. Possible values include: "Disabled", "Enabled". + :type request_body_check: str or ~azure.mgmt.frontdoor.models.PolicyRequestBodyCheck """ _validation = { @@ -1911,22 +2369,26 @@ class PolicySettings(Model): 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, 'custom_block_response_status_code': {'key': 'customBlockResponseStatusCode', 'type': 'int'}, 'custom_block_response_body': {'key': 'customBlockResponseBody', 'type': 'str'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PolicySettings, self).__init__(**kwargs) self.enabled_state = kwargs.get('enabled_state', None) self.mode = kwargs.get('mode', None) self.redirect_url = kwargs.get('redirect_url', None) self.custom_block_response_status_code = kwargs.get('custom_block_response_status_code', None) self.custom_block_response_body = kwargs.get('custom_block_response_body', None) + self.request_body_check = kwargs.get('request_body_check', None) class PreconfiguredEndpoint(Resource): """Defines the properties of a preconfigured endpoint. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1936,16 +2398,16 @@ class PreconfiguredEndpoint(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the endpoint + :param description: The description of the endpoint. :type description: str - :param endpoint: The endpoint that is preconfigured + :param endpoint: The endpoint that is preconfigured. :type endpoint: str - :param endpoint_type: The type of endpoint. Possible values include: - 'AFD', 'AzureRegion', 'CDN', 'ATM' + :param endpoint_type: The type of endpoint. Possible values include: "AFD", "AzureRegion", + "CDN", "ATM". :type endpoint_type: str or ~azure.mgmt.frontdoor.models.EndpointType - :param backend: The preconfigured endpoint backend + :param backend: The preconfigured endpoint backend. :type backend: str """ @@ -1967,7 +2429,10 @@ class PreconfiguredEndpoint(Resource): 'backend': {'key': 'properties.backend', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PreconfiguredEndpoint, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.endpoint = kwargs.get('endpoint', None) @@ -1975,11 +2440,39 @@ def __init__(self, **kwargs): self.backend = kwargs.get('backend', None) +class PreconfiguredEndpointList(msrest.serialization.Model): + """Defines a list of preconfigured endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of PreconfiguredEndpoints supported by NetworkExperiment. + :vartype value: list[~azure.mgmt.frontdoor.models.PreconfiguredEndpoint] + :param next_link: URL to get the next set of PreconfiguredEndpoints if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PreconfiguredEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PreconfiguredEndpointList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + class Profile(Resource): """Defines an Network Experiment Profile and lists of Experiments. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1989,24 +2482,23 @@ class Profile(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param etag: Gets a unique read-only string that changes whenever the - resource is updated. + :param etag: Gets a unique read-only string that changes whenever the resource is updated. :type etag: str + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { @@ -2015,46 +2507,81 @@ class Profile(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Profile, self).__init__(**kwargs) - self.resource_state = kwargs.get('resource_state', None) - self.enabled_state = kwargs.get('enabled_state', None) self.etag = kwargs.get('etag', None) + self.resource_state = None + self.enabled_state = kwargs.get('enabled_state', None) + +class ProfileList(msrest.serialization.Model): + """Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results. -class ProfileUpdateModel(Model): + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Profiles within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.Profile] + :param next_link: URL to get the next set of Profile objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Profile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProfileList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class ProfileUpdateModel(msrest.serialization.Model): """Defines modifiable attributes of a Profile. - :param enabled_state: The enabled state of the Profile. Possible values - include: 'Enabled', 'Disabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param enabled_state: The enabled state of the Profile. Possible values include: "Enabled", + "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ _attribute_map = { - 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ProfileUpdateModel, self).__init__(**kwargs) - self.enabled_state = kwargs.get('enabled_state', None) self.tags = kwargs.get('tags', None) + self.enabled_state = kwargs.get('enabled_state', None) -class PurgeParameters(Model): +class PurgeParameters(msrest.serialization.Model): """Parameters required for content purge. All required parameters must be populated in order to send to Azure. - :param content_paths: Required. The path to the content to be purged. Can - describe a file path or a wild card directory. + :param content_paths: Required. The path to the content to be purged. Can describe a file path + or a wild card directory. :type content_paths: list[str] """ @@ -2066,9 +2593,12 @@ class PurgeParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PurgeParameters, self).__init__(**kwargs) - self.content_paths = kwargs.get('content_paths', None) + self.content_paths = kwargs['content_paths'] class RedirectConfiguration(RouteConfiguration): @@ -2076,43 +2606,37 @@ class RedirectConfiguration(RouteConfiguration): All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param redirect_type: The redirect type the rule will use when redirecting - traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', - 'PermanentRedirect' - :type redirect_type: str or - ~azure.mgmt.frontdoor.models.FrontDoorRedirectType - :param redirect_protocol: The protocol of the destination to where the - traffic is redirected. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type redirect_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol - :param custom_host: Host to redirect. Leave empty to use the incoming host - as the destination host. + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param redirect_type: The redirect type the rule will use when redirecting traffic. Possible + values include: "Moved", "Found", "TemporaryRedirect", "PermanentRedirect". + :type redirect_type: str or ~azure.mgmt.frontdoor.models.FrontDoorRedirectType + :param redirect_protocol: The protocol of the destination to where the traffic is redirected. + Possible values include: "HttpOnly", "HttpsOnly", "MatchRequest". + :type redirect_protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol + :param custom_host: Host to redirect. Leave empty to use the incoming host as the destination + host. :type custom_host: str - :param custom_path: The full path to redirect. Path cannot be empty and - must start with /. Leave empty to use the incoming path as destination - path. + :param custom_path: The full path to redirect. Path cannot be empty and must start with /. + Leave empty to use the incoming path as destination path. :type custom_path: str - :param custom_fragment: Fragment to add to the redirect URL. Fragment is - the part of the URL that comes after #. Do not include the #. + :param custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL + that comes after #. Do not include the #. :type custom_fragment: str - :param custom_query_string: The set of query strings to be placed in the - redirect URL. Setting this value would replace any existing query string; - leave empty to preserve the incoming query string. Query string must be in - = format. The first ? and & will be added automatically so do - not include them in the front, but do separate multiple query strings with - &. + :param custom_query_string: The set of query strings to be placed in the redirect URL. Setting + this value would replace any existing query string; leave empty to preserve the incoming query + string. Query string must be in :code:``=:code:`` format. The first ? and & will be + added automatically so do not include them in the front, but do separate multiple query strings + with &. :type custom_query_string: str """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, 'redirect_type': {'key': 'redirectType', 'type': 'str'}, 'redirect_protocol': {'key': 'redirectProtocol', 'type': 'str'}, 'custom_host': {'key': 'customHost', 'type': 'str'}, @@ -2121,89 +2645,117 @@ class RedirectConfiguration(RouteConfiguration): 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RedirectConfiguration, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' # type: str self.redirect_type = kwargs.get('redirect_type', None) self.redirect_protocol = kwargs.get('redirect_protocol', None) self.custom_host = kwargs.get('custom_host', None) self.custom_path = kwargs.get('custom_path', None) self.custom_fragment = kwargs.get('custom_fragment', None) self.custom_query_string = kwargs.get('custom_query_string', None) - self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' class RoutingRule(SubResource): - """A routing rule represents a specification for traffic to treat and where to - send it, along with health probe information. + """A routing rule represents a specification for traffic to treat and where to send it, along with health probe information. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param frontend_endpoints: Frontend endpoints associated with this rule + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param frontend_endpoints: Frontend endpoints associated with this rule. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] - :param accepted_protocols: Protocol schemes to match for this rule - :type accepted_protocols: list[str or - ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param enabled_state: Whether to enable use of this rule. Permitted values - are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState :param route_configuration: A reference to the routing configuration. :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState - :param name: Resource name. - :type name: str - :ivar type: Resource type. - :vartype type: str + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'properties.acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'properties.patternsToMatch', 'type': '[str]'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'route_configuration': {'key': 'properties.routeConfiguration', 'type': 'RouteConfiguration'}, + 'rules_engine': {'key': 'properties.rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'properties.webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RoutingRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None self.frontend_endpoints = kwargs.get('frontend_endpoints', None) self.accepted_protocols = kwargs.get('accepted_protocols', None) self.patterns_to_match = kwargs.get('patterns_to_match', None) self.enabled_state = kwargs.get('enabled_state', None) self.route_configuration = kwargs.get('route_configuration', None) - self.resource_state = kwargs.get('resource_state', None) - self.name = kwargs.get('name', None) - self.type = None + self.rules_engine = kwargs.get('rules_engine', None) + self.web_application_firewall_policy_link = kwargs.get('web_application_firewall_policy_link', None) + self.resource_state = None -class RoutingRuleListResult(Model): - """Result of the request to list Routing Rules. It contains a list of Routing - Rule objects and a URL link to get the next set of results. +class RoutingRuleLink(msrest.serialization.Model): + """Defines the Resource ID for a Routing Rule. - Variables are only populated by the server, and will be ignored when - sending a request. + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingRuleLink, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RoutingRuleListResult(msrest.serialization.Model): + """Result of the request to list Routing Rules. It contains a list of Routing Rule objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Routing Rules within a Front Door. :vartype value: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param next_link: URL to get the next set of RoutingRule objects if there - are any. + :param next_link: URL to get the next set of RoutingRule objects if there are any. :type next_link: str """ @@ -2216,29 +2768,36 @@ class RoutingRuleListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RoutingRuleListResult, self).__init__(**kwargs) self.value = None self.next_link = kwargs.get('next_link', None) -class RoutingRuleUpdateParameters(Model): +class RoutingRuleUpdateParameters(msrest.serialization.Model): """Routing rules to apply to an endpoint. - :param frontend_endpoints: Frontend endpoints associated with this rule + :param frontend_endpoints: Frontend endpoints associated with this rule. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] - :param accepted_protocols: Protocol schemes to match for this rule - :type accepted_protocols: list[str or - ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param enabled_state: Whether to enable use of this rule. Permitted values - are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState :param route_configuration: A reference to the routing configuration. :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink """ _attribute_map = { @@ -2247,21 +2806,389 @@ class RoutingRuleUpdateParameters(Model): 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, + 'rules_engine': {'key': 'rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RoutingRuleUpdateParameters, self).__init__(**kwargs) self.frontend_endpoints = kwargs.get('frontend_endpoints', None) self.accepted_protocols = kwargs.get('accepted_protocols', None) self.patterns_to_match = kwargs.get('patterns_to_match', None) self.enabled_state = kwargs.get('enabled_state', None) self.route_configuration = kwargs.get('route_configuration', None) + self.rules_engine = kwargs.get('rules_engine', None) + self.web_application_firewall_policy_link = kwargs.get('web_application_firewall_policy_link', None) + +class RoutingRuleProperties(RoutingRuleUpdateParameters): + """The JSON object that contains the properties required to create a routing rule. -class TagsObject(Model): + Variables are only populated by the server, and will be ignored when sending a request. + + :param frontend_endpoints: Frontend endpoints associated with this rule. + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param patterns_to_match: The route patterns of the rule. + :type patterns_to_match: list[str] + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[SubResource]'}, + 'accepted_protocols': {'key': 'acceptedProtocols', 'type': '[str]'}, + 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, + 'rules_engine': {'key': 'rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingRuleProperties, self).__init__(**kwargs) + self.resource_state = None + + +class RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink(msrest.serialization.Model): + """Defines the Web Application Firewall policy for each routing rule (if applicable). + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RulesEngine(msrest.serialization.Model): + """A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar id: Resource ID. + :vartype id: str + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[RulesEngineRule]'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngine, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.rules = kwargs.get('rules', None) + self.resource_state = None + + +class RulesEngineAction(msrest.serialization.Model): + """One or more actions that will execute, modifying the request and/or response. + + :param request_header_actions: A list of header actions to apply from the request from AFD to + the origin. + :type request_header_actions: list[~azure.mgmt.frontdoor.models.HeaderAction] + :param response_header_actions: A list of header actions to apply from the response from AFD to + the client. + :type response_header_actions: list[~azure.mgmt.frontdoor.models.HeaderAction] + :param route_configuration_override: Override the route configuration. + :type route_configuration_override: ~azure.mgmt.frontdoor.models.RouteConfiguration + """ + + _attribute_map = { + 'request_header_actions': {'key': 'requestHeaderActions', 'type': '[HeaderAction]'}, + 'response_header_actions': {'key': 'responseHeaderActions', 'type': '[HeaderAction]'}, + 'route_configuration_override': {'key': 'routeConfigurationOverride', 'type': 'RouteConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineAction, self).__init__(**kwargs) + self.request_header_actions = kwargs.get('request_header_actions', None) + self.response_header_actions = kwargs.get('response_header_actions', None) + self.route_configuration_override = kwargs.get('route_configuration_override', None) + + +class RulesEngineListResult(msrest.serialization.Model): + """Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of rulesEngines within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.RulesEngine] + :param next_link: URL to get the next set of RulesEngine objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RulesEngine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class RulesEngineMatchCondition(msrest.serialization.Model): + """Define a match condition. + + All required parameters must be populated in order to send to Azure. + + :param rules_engine_match_variable: Required. Match Variable. Possible values include: + "IsMobile", "RemoteAddr", "RequestMethod", "QueryString", "PostArgs", "RequestUri", + "RequestPath", "RequestFilename", "RequestFilenameExtension", "RequestHeader", "RequestBody", + "RequestScheme". + :type rules_engine_match_variable: str or ~azure.mgmt.frontdoor.models.RulesEngineMatchVariable + :param selector: Name of selector in RequestHeader or RequestBody to be matched. + :type selector: str + :param rules_engine_operator: Required. Describes operator to apply to the match condition. + Possible values include: "Any", "IPMatch", "GeoMatch", "Equal", "Contains", "LessThan", + "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", "BeginsWith", "EndsWith". + :type rules_engine_operator: str or ~azure.mgmt.frontdoor.models.RulesEngineOperator + :param negate_condition: Describes if this is negate condition or not. + :type negate_condition: bool + :param rules_engine_match_value: Required. Match values to match against. The operator will + apply to each value in here with OR semantics. If any of them match the variable with the given + operator this match condition is considered a match. + :type rules_engine_match_value: list[str] + :param transforms: List of transforms. + :type transforms: list[str or ~azure.mgmt.frontdoor.models.Transform] + """ + + _validation = { + 'rules_engine_match_variable': {'required': True}, + 'rules_engine_operator': {'required': True}, + 'rules_engine_match_value': {'required': True}, + } + + _attribute_map = { + 'rules_engine_match_variable': {'key': 'rulesEngineMatchVariable', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'rules_engine_operator': {'key': 'rulesEngineOperator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'rules_engine_match_value': {'key': 'rulesEngineMatchValue', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineMatchCondition, self).__init__(**kwargs) + self.rules_engine_match_variable = kwargs['rules_engine_match_variable'] + self.selector = kwargs.get('selector', None) + self.rules_engine_operator = kwargs['rules_engine_operator'] + self.negate_condition = kwargs.get('negate_condition', None) + self.rules_engine_match_value = kwargs['rules_engine_match_value'] + self.transforms = kwargs.get('transforms', None) + + +class RulesEngineUpdateParameters(msrest.serialization.Model): + """Rules Engine Configuration to apply to a Routing Rule. + + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + """ + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[RulesEngineRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineUpdateParameters, self).__init__(**kwargs) + self.rules = kwargs.get('rules', None) + + +class RulesEngineProperties(RulesEngineUpdateParameters): + """The JSON object that contains the properties required to create a Rules Engine Configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[RulesEngineRule]'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineProperties, self).__init__(**kwargs) + self.resource_state = None + + +class RulesEngineRule(msrest.serialization.Model): + """Contains a list of match conditions, and an action on how to modify the request/response. If multiple rules match, the actions from one rule that conflict with a previous rule overwrite for a singular action, or append in the case of headers manipulation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A name to refer to this specific rule. + :type name: str + :param priority: Required. A priority assigned to this rule. + :type priority: int + :param action: Required. Actions to perform on the request and response if all of the match + conditions are met. + :type action: ~azure.mgmt.frontdoor.models.RulesEngineAction + :param match_conditions: A list of match conditions that must meet in order for the actions of + this rule to run. Having no match conditions means the actions will always run. + :type match_conditions: list[~azure.mgmt.frontdoor.models.RulesEngineMatchCondition] + :param match_processing_behavior: If this rule is a match should the rules engine continue + running the remaining rules or stop. If not present, defaults to Continue. Possible values + include: "Continue", "Stop". + :type match_processing_behavior: str or ~azure.mgmt.frontdoor.models.MatchProcessingBehavior + """ + + _validation = { + 'name': {'required': True}, + 'priority': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'RulesEngineAction'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[RulesEngineMatchCondition]'}, + 'match_processing_behavior': {'key': 'matchProcessingBehavior', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RulesEngineRule, self).__init__(**kwargs) + self.name = kwargs['name'] + self.priority = kwargs['priority'] + self.action = kwargs['action'] + self.match_conditions = kwargs.get('match_conditions', None) + self.match_processing_behavior = kwargs.get('match_processing_behavior', None) + + +class SecurityPolicyLink(msrest.serialization.Model): + """Defines the Resource ID for a Security Policy. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityPolicyLink, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class Sku(msrest.serialization.Model): + """The pricing tier of the web application firewall policy. + + :param name: Name of the pricing tier. Possible values include: "Classic_AzureFrontDoor", + "Standard_AzureFrontDoor", "Premium_AzureFrontDoor". + :type name: str or ~azure.mgmt.frontdoor.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2269,7 +3196,10 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) @@ -2277,8 +3207,7 @@ def __init__(self, **kwargs): class Timeseries(Resource): """Defines the Timeseries. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -2288,28 +3217,25 @@ class Timeseries(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param endpoint: The endpoint associated with the Timeseries data point + :param endpoint: The endpoint associated with the Timeseries data point. :type endpoint: str - :param start_date_time_utc: The start DateTime of the Timeseries in UTC + :param start_date_time_utc: The start DateTime of the Timeseries in UTC. :type start_date_time_utc: str - :param end_date_time_utc: The end DateTime of the Timeseries in UTC + :param end_date_time_utc: The end DateTime of the Timeseries in UTC. :type end_date_time_utc: str - :param aggregation_interval: The aggregation interval of the Timeseries. - Possible values include: 'Hourly', 'Daily' - :type aggregation_interval: str or - ~azure.mgmt.frontdoor.models.AggregationInterval - :param timeseries_type: The type of Timeseries. Possible values include: - 'MeasurementCounts', 'LatencyP50', 'LatencyP75', 'LatencyP95' + :param aggregation_interval: The aggregation interval of the Timeseries. Possible values + include: "Hourly", "Daily". + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.AggregationInterval + :param timeseries_type: The type of Timeseries. Possible values include: "MeasurementCounts", + "LatencyP50", "LatencyP75", "LatencyP95". :type timeseries_type: str or ~azure.mgmt.frontdoor.models.TimeseriesType - :param country: The country associated with the Timeseries. Values are - country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :param country: The country associated with the Timeseries. Values are country ISO codes as + specified here- https://www.iso.org/iso-3166-country-codes.html. :type country: str - :param timeseries_data: The set of data points for the timeseries - :type timeseries_data: - list[~azure.mgmt.frontdoor.models.TimeseriesDataPoint] + :param timeseries_data: The set of data points for the timeseries. + :type timeseries_data: list[~azure.mgmt.frontdoor.models.TimeseriesDataPoint] """ _validation = { @@ -2333,7 +3259,10 @@ class Timeseries(Resource): 'timeseries_data': {'key': 'properties.timeseriesData', 'type': '[TimeseriesDataPoint]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Timeseries, self).__init__(**kwargs) self.endpoint = kwargs.get('endpoint', None) self.start_date_time_utc = kwargs.get('start_date_time_utc', None) @@ -2344,12 +3273,12 @@ def __init__(self, **kwargs): self.timeseries_data = kwargs.get('timeseries_data', None) -class TimeseriesDataPoint(Model): +class TimeseriesDataPoint(msrest.serialization.Model): """Defines a timeseries datapoint used in a timeseries. - :param date_time_utc: The DateTime of the Timeseries data point in UTC + :param date_time_utc: The DateTime of the Timeseries data point in UTC. :type date_time_utc: str - :param value: The Value of the Timeseries data point + :param value: The Value of the Timeseries data point. :type value: float """ @@ -2358,19 +3287,21 @@ class TimeseriesDataPoint(Model): 'value': {'key': 'value', 'type': 'float'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeseriesDataPoint, self).__init__(**kwargs) self.date_time_utc = kwargs.get('date_time_utc', None) self.value = kwargs.get('value', None) -class ValidateCustomDomainInput(Model): +class ValidateCustomDomainInput(msrest.serialization.Model): """Input of the custom domain to be validated for DNS mapping. All required parameters must be populated in order to send to Azure. - :param host_name: Required. The host name of the custom domain. Must be a - domain name. + :param host_name: Required. The host name of the custom domain. Must be a domain name. :type host_name: str """ @@ -2382,24 +3313,24 @@ class ValidateCustomDomainInput(Model): 'host_name': {'key': 'hostName', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidateCustomDomainInput, self).__init__(**kwargs) - self.host_name = kwargs.get('host_name', None) + self.host_name = kwargs['host_name'] -class ValidateCustomDomainOutput(Model): +class ValidateCustomDomainOutput(msrest.serialization.Model): """Output of custom domain validation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar custom_domain_validated: Indicates whether the custom domain is - valid or not. + :ivar custom_domain_validated: Indicates whether the custom domain is valid or not. :vartype custom_domain_validated: bool :ivar reason: The reason why the custom domain is not valid. :vartype reason: str - :ivar message: Error message describing why the custom domain is not - valid. + :ivar message: Error message describing why the custom domain is not valid. :vartype message: str """ @@ -2415,7 +3346,10 @@ class ValidateCustomDomainOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ValidateCustomDomainOutput, self).__init__(**kwargs) self.custom_domain_validated = None self.reason = None @@ -2425,8 +3359,7 @@ def __init__(self, **kwargs): class WebApplicationFirewallPolicy(Resource): """Defines web application firewall policy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -2436,28 +3369,33 @@ class WebApplicationFirewallPolicy(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param etag: Gets a unique read-only string that changes whenever the resource is updated. + :type etag: str + :param sku: The pricing tier of web application firewall policy. Defaults to + Classic_AzureFrontDoor if not specified. + :type sku: ~azure.mgmt.frontdoor.models.Sku :param policy_settings: Describes settings for the policy. :type policy_settings: ~azure.mgmt.frontdoor.models.PolicySettings :param custom_rules: Describes custom rules inside the policy. :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRuleList :param managed_rules: Describes managed rules inside the policy. :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSetList - :ivar frontend_endpoint_links: Describes Frontend Endpoints associated - with this Web Application Firewall policy. - :vartype frontend_endpoint_links: - list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar frontend_endpoint_links: Describes Frontend Endpoints associated with this Web + Application Firewall policy. + :vartype frontend_endpoint_links: list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar routing_rule_links: Describes Routing Rules associated with this Web Application Firewall + policy. + :vartype routing_rule_links: list[~azure.mgmt.frontdoor.models.RoutingRuleLink] + :ivar security_policy_links: Describes Security Policy associated with this Web Application + Firewall policy. + :vartype security_policy_links: list[~azure.mgmt.frontdoor.models.SecurityPolicyLink] :ivar provisioning_state: Provisioning state of the policy. :vartype provisioning_state: str - :ivar resource_state: Resource status of the policy. Possible values - include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', - 'Deleting' - :vartype resource_state: str or - ~azure.mgmt.frontdoor.models.PolicyResourceState - :param etag: Gets a unique read-only string that changes whenever the - resource is updated. - :type etag: str + :ivar resource_state: Resource status of the policy. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.PolicyResourceState """ _validation = { @@ -2465,6 +3403,8 @@ class WebApplicationFirewallPolicy(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'frontend_endpoint_links': {'readonly': True}, + 'routing_rule_links': {'readonly': True}, + 'security_policy_links': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, } @@ -2475,21 +3415,60 @@ class WebApplicationFirewallPolicy(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRuleList'}, 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSetList'}, 'frontend_endpoint_links': {'key': 'properties.frontendEndpointLinks', 'type': '[FrontendEndpointLink]'}, + 'routing_rule_links': {'key': 'properties.routingRuleLinks', 'type': '[RoutingRuleLink]'}, + 'security_policy_links': {'key': 'properties.securityPolicyLinks', 'type': '[SecurityPolicyLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(WebApplicationFirewallPolicy, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.sku = kwargs.get('sku', None) self.policy_settings = kwargs.get('policy_settings', None) self.custom_rules = kwargs.get('custom_rules', None) self.managed_rules = kwargs.get('managed_rules', None) self.frontend_endpoint_links = None + self.routing_rule_links = None + self.security_policy_links = None self.provisioning_state = None self.resource_state = None - self.etag = kwargs.get('etag', None) + + +class WebApplicationFirewallPolicyList(msrest.serialization.Model): + """Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of WebApplicationFirewallPolicies within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] + :param next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are + any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebApplicationFirewallPolicyList, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models_py3.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models_py3.py index 41059ec2978..6b92523bcb4 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models_py3.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/models/_models_py3.py @@ -1,31 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +from azure.core.exceptions import HttpResponseError +import msrest.serialization -class AzureAsyncOperationResult(Model): - """The response body contains the status of the specified asynchronous - operation, indicating whether it has succeeded, is in progress, or has - failed. Note that this status is distinct from the HTTP status code - returned for the Get Operation Status operation itself. If the asynchronous - operation succeeded, the response body includes the HTTP status code for - the successful request. If the asynchronous operation failed, the response - body includes the HTTP status code for the failed request and error - information regarding the failure. +from ._front_door_management_client_enums import * - :param status: Status of the Azure async operation. Possible values are: - 'InProgress', 'Succeeded', and 'Failed'. Possible values include: - 'InProgress', 'Succeeded', 'Failed' + +class AzureAsyncOperationResult(msrest.serialization.Model): + """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. + + :param status: Status of the Azure async operation. Possible values are: 'InProgress', + 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.frontdoor.models.NetworkOperationStatus :param error: :type error: ~azure.mgmt.frontdoor.models.Error @@ -36,38 +30,59 @@ class AzureAsyncOperationResult(Model): 'error': {'key': 'error', 'type': 'Error'}, } - def __init__(self, *, status=None, error=None, **kwargs) -> None: + def __init__( + self, + *, + status: Optional[Union[str, "NetworkOperationStatus"]] = None, + error: Optional["Error"] = None, + **kwargs + ): super(AzureAsyncOperationResult, self).__init__(**kwargs) self.status = status self.error = error -class Backend(Model): +class Backend(msrest.serialization.Model): """Backend address of a frontDoor load balancer. - :param address: Location of the backend (IP address or FQDN) + Variables are only populated by the server, and will be ignored when sending a request. + + :param address: Location of the backend (IP address or FQDN). :type address: str + :param private_link_alias: The Alias of the Private Link resource. Populating this optional + field indicates that this backend is 'Private'. + :type private_link_alias: str + :param private_link_resource_id: The Resource Id of the Private Link resource. Populating this + optional field indicates that this backend is 'Private'. + :type private_link_resource_id: str + :param private_link_location: The location of the Private Link resource. Required only if + 'privateLinkResourceId' is populated. + :type private_link_location: str + :ivar private_endpoint_status: The Approval status for the connection to the Private Link. + Possible values include: "Pending", "Approved", "Rejected", "Disconnected", "Timeout". + :vartype private_endpoint_status: str or ~azure.mgmt.frontdoor.models.PrivateEndpointStatus + :param private_link_approval_message: A custom message to be included in the approval request + to connect to the Private Link. + :type private_link_approval_message: str :param http_port: The HTTP TCP port number. Must be between 1 and 65535. :type http_port: int :param https_port: The HTTPS TCP port number. Must be between 1 and 65535. :type https_port: int - :param enabled_state: Whether to enable use of this backend. Permitted - values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.BackendEnabledState - :param priority: Priority to use for load balancing. Higher priorities - will not be used for load balancing if any lower priority backend is - healthy. + :param enabled_state: Whether to enable use of this backend. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.BackendEnabledState + :param priority: Priority to use for load balancing. Higher priorities will not be used for + load balancing if any lower priority backend is healthy. :type priority: int :param weight: Weight of this endpoint for load balancing purposes. :type weight: int - :param backend_host_header: The value to use as the host header sent to - the backend. If blank or unspecified, this defaults to the incoming host. + :param backend_host_header: The value to use as the host header sent to the backend. If blank + or unspecified, this defaults to the incoming host. :type backend_host_header: str """ _validation = { + 'private_endpoint_status': {'readonly': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, 'priority': {'maximum': 5, 'minimum': 1}, @@ -76,6 +91,11 @@ class Backend(Model): _attribute_map = { 'address': {'key': 'address', 'type': 'str'}, + 'private_link_alias': {'key': 'privateLinkAlias', 'type': 'str'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'private_link_location': {'key': 'privateLinkLocation', 'type': 'str'}, + 'private_endpoint_status': {'key': 'privateEndpointStatus', 'type': 'str'}, + 'private_link_approval_message': {'key': 'privateLinkApprovalMessage', 'type': 'str'}, 'http_port': {'key': 'httpPort', 'type': 'int'}, 'https_port': {'key': 'httpsPort', 'type': 'int'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, @@ -84,9 +104,29 @@ class Backend(Model): 'backend_host_header': {'key': 'backendHostHeader', 'type': 'str'}, } - def __init__(self, *, address: str=None, http_port: int=None, https_port: int=None, enabled_state=None, priority: int=None, weight: int=None, backend_host_header: str=None, **kwargs) -> None: + def __init__( + self, + *, + address: Optional[str] = None, + private_link_alias: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + private_link_location: Optional[str] = None, + private_link_approval_message: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + enabled_state: Optional[Union[str, "BackendEnabledState"]] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + backend_host_header: Optional[str] = None, + **kwargs + ): super(Backend, self).__init__(**kwargs) self.address = address + self.private_link_alias = private_link_alias + self.private_link_resource_id = private_link_resource_id + self.private_link_location = private_link_location + self.private_endpoint_status = None + self.private_link_approval_message = private_link_approval_message self.http_port = http_port self.https_port = https_port self.enabled_state = enabled_state @@ -95,7 +135,7 @@ def __init__(self, *, address: str=None, http_port: int=None, https_port: int=No self.backend_host_header = backend_host_header -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. :param id: Resource ID. @@ -106,7 +146,12 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = id @@ -114,62 +159,67 @@ def __init__(self, *, id: str=None, **kwargs) -> None: class BackendPool(SubResource): """A backend pool is a collection of backends that can be routed to. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param backends: The set of backends for this pool - :type backends: list[~azure.mgmt.frontdoor.models.Backend] - :param load_balancing_settings: Load balancing settings for a backend pool - :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource - :param health_probe_settings: L7 health probe settings for a backend pool - :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str + :param backends: The set of backends for this pool. + :type backends: list[~azure.mgmt.frontdoor.models.Backend] + :param load_balancing_settings: Load balancing settings for a backend pool. + :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource + :param health_probe_settings: L7 health probe settings for a backend pool. + :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'backends': {'key': 'properties.backends', 'type': '[Backend]'}, 'load_balancing_settings': {'key': 'properties.loadBalancingSettings', 'type': 'SubResource'}, 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'SubResource'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, backends=None, load_balancing_settings=None, health_probe_settings=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + backends: Optional[List["Backend"]] = None, + load_balancing_settings: Optional["SubResource"] = None, + health_probe_settings: Optional["SubResource"] = None, + **kwargs + ): super(BackendPool, self).__init__(id=id, **kwargs) + self.name = name + self.type = None self.backends = backends self.load_balancing_settings = load_balancing_settings self.health_probe_settings = health_probe_settings - self.resource_state = resource_state - self.name = name - self.type = None + self.resource_state = None -class BackendPoolListResult(Model): - """Result of the request to list Backend Pools. It contains a list of Backend - Pools objects and a URL link to get the next set of results. +class BackendPoolListResult(msrest.serialization.Model): + """Result of the request to list Backend Pools. It contains a list of Backend Pools objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Backend Pools within a Front Door. :vartype value: list[~azure.mgmt.frontdoor.models.BackendPool] - :param next_link: URL to get the next set of BackendPool objects if there - are any. + :param next_link: URL to get the next set of BackendPool objects if there are any. :type next_link: str """ @@ -182,101 +232,170 @@ class BackendPoolListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, *, next_link: str=None, **kwargs) -> None: + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): super(BackendPoolListResult, self).__init__(**kwargs) self.value = None self.next_link = next_link -class BackendPoolsSettings(Model): - """Settings that apply to all backend pools. +class BackendPoolUpdateParameters(msrest.serialization.Model): + """A collection of backends that can be routed to. - :param enforce_certificate_name_check: Whether to enforce certificate name - check on HTTPS requests to all backend pools. No effect on non-HTTPS - requests. Possible values include: 'Enabled', 'Disabled'. Default value: - "Enabled" . - :type enforce_certificate_name_check: str or - ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState - :param send_recv_timeout_seconds: Send and receive timeout on forwarding - request to the backend. When timeout is reached, the request fails and - returns. - :type send_recv_timeout_seconds: int + :param backends: The set of backends for this pool. + :type backends: list[~azure.mgmt.frontdoor.models.Backend] + :param load_balancing_settings: Load balancing settings for a backend pool. + :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource + :param health_probe_settings: L7 health probe settings for a backend pool. + :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource """ - _validation = { - 'send_recv_timeout_seconds': {'minimum': 16}, - } - _attribute_map = { - 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, - 'send_recv_timeout_seconds': {'key': 'sendRecvTimeoutSeconds', 'type': 'int'}, + 'backends': {'key': 'backends', 'type': '[Backend]'}, + 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': 'SubResource'}, + 'health_probe_settings': {'key': 'healthProbeSettings', 'type': 'SubResource'}, } - def __init__(self, *, enforce_certificate_name_check="Enabled", send_recv_timeout_seconds: int=None, **kwargs) -> None: - super(BackendPoolsSettings, self).__init__(**kwargs) - self.enforce_certificate_name_check = enforce_certificate_name_check - self.send_recv_timeout_seconds = send_recv_timeout_seconds + def __init__( + self, + *, + backends: Optional[List["Backend"]] = None, + load_balancing_settings: Optional["SubResource"] = None, + health_probe_settings: Optional["SubResource"] = None, + **kwargs + ): + super(BackendPoolUpdateParameters, self).__init__(**kwargs) + self.backends = backends + self.load_balancing_settings = load_balancing_settings + self.health_probe_settings = health_probe_settings -class BackendPoolUpdateParameters(Model): - """A collection of backends that can be routed to. +class BackendPoolProperties(BackendPoolUpdateParameters): + """The JSON object that contains the properties required to create a Backend Pool. - :param backends: The set of backends for this pool + Variables are only populated by the server, and will be ignored when sending a request. + + :param backends: The set of backends for this pool. :type backends: list[~azure.mgmt.frontdoor.models.Backend] - :param load_balancing_settings: Load balancing settings for a backend pool + :param load_balancing_settings: Load balancing settings for a backend pool. :type load_balancing_settings: ~azure.mgmt.frontdoor.models.SubResource - :param health_probe_settings: L7 health probe settings for a backend pool + :param health_probe_settings: L7 health probe settings for a backend pool. :type health_probe_settings: ~azure.mgmt.frontdoor.models.SubResource + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ + _validation = { + 'resource_state': {'readonly': True}, + } + _attribute_map = { 'backends': {'key': 'backends', 'type': '[Backend]'}, 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': 'SubResource'}, 'health_probe_settings': {'key': 'healthProbeSettings', 'type': 'SubResource'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + *, + backends: Optional[List["Backend"]] = None, + load_balancing_settings: Optional["SubResource"] = None, + health_probe_settings: Optional["SubResource"] = None, + **kwargs + ): + super(BackendPoolProperties, self).__init__(backends=backends, load_balancing_settings=load_balancing_settings, health_probe_settings=health_probe_settings, **kwargs) + self.resource_state = None + + +class BackendPoolsSettings(msrest.serialization.Model): + """Settings that apply to all backend pools. + + :param enforce_certificate_name_check: Whether to enforce certificate name check on HTTPS + requests to all backend pools. No effect on non-HTTPS requests. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type enforce_certificate_name_check: str or + ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState + :param send_recv_timeout_seconds: Send and receive timeout on forwarding request to the + backend. When timeout is reached, the request fails and returns. + :type send_recv_timeout_seconds: int + """ + + _validation = { + 'send_recv_timeout_seconds': {'minimum': 16}, } - def __init__(self, *, backends=None, load_balancing_settings=None, health_probe_settings=None, **kwargs) -> None: - super(BackendPoolUpdateParameters, self).__init__(**kwargs) - self.backends = backends - self.load_balancing_settings = load_balancing_settings - self.health_probe_settings = health_probe_settings + _attribute_map = { + 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, + 'send_recv_timeout_seconds': {'key': 'sendRecvTimeoutSeconds', 'type': 'int'}, + } + def __init__( + self, + *, + enforce_certificate_name_check: Optional[Union[str, "EnforceCertificateNameCheckEnabledState"]] = "Enabled", + send_recv_timeout_seconds: Optional[int] = None, + **kwargs + ): + super(BackendPoolsSettings, self).__init__(**kwargs) + self.enforce_certificate_name_check = enforce_certificate_name_check + self.send_recv_timeout_seconds = send_recv_timeout_seconds -class CacheConfiguration(Model): - """Caching settings for a caching-type route. To disable caching, do not - provide a cacheConfiguration object. - :param query_parameter_strip_directive: Treatment of URL query terms when - forming the cache key. Possible values include: 'StripNone', 'StripAll' - :type query_parameter_strip_directive: str or - ~azure.mgmt.frontdoor.models.FrontDoorQuery - :param dynamic_compression: Whether to use dynamic compression for cached - content. Possible values include: 'Enabled', 'Disabled' - :type dynamic_compression: str or - ~azure.mgmt.frontdoor.models.DynamicCompressionEnabled +class CacheConfiguration(msrest.serialization.Model): + """Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + + :param query_parameter_strip_directive: Treatment of URL query terms when forming the cache + key. Possible values include: "StripNone", "StripAll", "StripOnly", "StripAllExcept". + :type query_parameter_strip_directive: str or ~azure.mgmt.frontdoor.models.FrontDoorQuery + :param query_parameters: query parameters to include or exclude (comma separated). + :type query_parameters: str + :param dynamic_compression: Whether to use dynamic compression for cached content. Possible + values include: "Enabled", "Disabled". + :type dynamic_compression: str or ~azure.mgmt.frontdoor.models.DynamicCompressionEnabled + :param cache_duration: The duration for which the content needs to be cached. Allowed format is + in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). HTTP requires the value + to be no more than a year. + :type cache_duration: ~datetime.timedelta """ _attribute_map = { 'query_parameter_strip_directive': {'key': 'queryParameterStripDirective', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, 'dynamic_compression': {'key': 'dynamicCompression', 'type': 'str'}, - } - - def __init__(self, *, query_parameter_strip_directive=None, dynamic_compression=None, **kwargs) -> None: + 'cache_duration': {'key': 'cacheDuration', 'type': 'duration'}, + } + + def __init__( + self, + *, + query_parameter_strip_directive: Optional[Union[str, "FrontDoorQuery"]] = None, + query_parameters: Optional[str] = None, + dynamic_compression: Optional[Union[str, "DynamicCompressionEnabled"]] = None, + cache_duration: Optional[datetime.timedelta] = None, + **kwargs + ): super(CacheConfiguration, self).__init__(**kwargs) self.query_parameter_strip_directive = query_parameter_strip_directive + self.query_parameters = query_parameters self.dynamic_compression = dynamic_compression + self.cache_duration = cache_duration -class CheckNameAvailabilityInput(Model): +class CheckNameAvailabilityInput(msrest.serialization.Model): """Input of CheckNameAvailability API. All required parameters must be populated in order to send to Azure. :param name: Required. The resource name to validate. :type name: str - :param type: Required. The type of the resource whose name is to be - validated. Possible values include: 'Microsoft.Network/frontDoors', - 'Microsoft.Network/frontDoors/frontendEndpoints' + :param type: Required. The type of the resource whose name is to be validated. Possible values + include: "Microsoft.Network/frontDoors", "Microsoft.Network/frontDoors/frontendEndpoints". :type type: str or ~azure.mgmt.frontdoor.models.ResourceType """ @@ -287,29 +406,32 @@ class CheckNameAvailabilityInput(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceType'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, type, **kwargs) -> None: + def __init__( + self, + *, + name: str, + type: Union[str, "ResourceType"], + **kwargs + ): super(CheckNameAvailabilityInput, self).__init__(**kwargs) self.name = name self.type = type -class CheckNameAvailabilityOutput(Model): +class CheckNameAvailabilityOutput(msrest.serialization.Model): """Output of check name availability API. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar name_availability: Indicates whether the name is available. Possible - values include: 'Available', 'Unavailable' - :vartype name_availability: str or - ~azure.mgmt.frontdoor.models.Availability + :ivar name_availability: Indicates whether the name is available. Possible values include: + "Available", "Unavailable". + :vartype name_availability: str or ~azure.mgmt.frontdoor.models.Availability :ivar reason: The reason why the name is not available. :vartype reason: str - :ivar message: The detailed error message describing why the name is not - available. + :ivar message: The detailed error message describing why the name is not available. :vartype message: str """ @@ -325,60 +447,45 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.name_availability = None self.reason = None self.message = None -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class CustomHttpsConfiguration(Model): +class CustomHttpsConfiguration(msrest.serialization.Model): """Https settings for a domain. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. - :param certificate_source: Required. Defines the source of the SSL - certificate. Possible values include: 'AzureKeyVault', 'FrontDoor' - :type certificate_source: str or - ~azure.mgmt.frontdoor.models.FrontDoorCertificateSource - :ivar protocol_type: Required. Defines the TLS extension protocol that is - used for secure delivery. Default value: "ServerNameIndication" . - :vartype protocol_type: str - :param minimum_tls_version: Required. The minimum TLS version required - from the clients to establish an SSL handshake with Front Door. Possible - values include: '1.0', '1.2' - :type minimum_tls_version: str or - ~azure.mgmt.frontdoor.models.MinimumTLSVersion - :param vault: The Key Vault containing the SSL certificate - :type vault: - ~azure.mgmt.frontdoor.models.KeyVaultCertificateSourceParametersVault - :param secret_name: The name of the Key Vault secret representing the full - certificate PFX + :param certificate_source: Required. Defines the source of the SSL certificate. Possible values + include: "AzureKeyVault", "FrontDoor". + :type certificate_source: str or ~azure.mgmt.frontdoor.models.FrontDoorCertificateSource + :param protocol_type: Required. Defines the TLS extension protocol that is used for secure + delivery. Possible values include: "ServerNameIndication". + :type protocol_type: str or ~azure.mgmt.frontdoor.models.FrontDoorTlsProtocolType + :param minimum_tls_version: Required. The minimum TLS version required from the clients to + establish an SSL handshake with Front Door. Possible values include: "1.0", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.frontdoor.models.MinimumTLSVersion + :param certificate_type: Defines the type of the certificate used for secure connections to a + frontendEndpoint. Possible values include: "Dedicated". + :type certificate_type: str or ~azure.mgmt.frontdoor.models.FrontDoorCertificateType + :param vault: The Key Vault containing the SSL certificate. + :type vault: ~azure.mgmt.frontdoor.models.KeyVaultCertificateSourceParametersVault + :param secret_name: The name of the Key Vault secret representing the full certificate PFX. :type secret_name: str - :param secret_version: The version of the Key Vault secret representing - the full certificate PFX + :param secret_version: The version of the Key Vault secret representing the full certificate + PFX. :type secret_version: str - :param certificate_type: Defines the type of the certificate used for - secure connections to a frontendEndpoint. Possible values include: - 'Dedicated' - :type certificate_type: str or - ~azure.mgmt.frontdoor.models.FrontDoorCertificateType """ _validation = { 'certificate_source': {'required': True}, - 'protocol_type': {'required': True, 'constant': True}, + 'protocol_type': {'required': True}, 'minimum_tls_version': {'required': True}, } @@ -386,57 +493,64 @@ class CustomHttpsConfiguration(Model): 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'protocol_type': {'key': 'protocolType', 'type': 'str'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + 'certificate_type': {'key': 'frontDoorCertificateSourceParameters.certificateType', 'type': 'str'}, 'vault': {'key': 'keyVaultCertificateSourceParameters.vault', 'type': 'KeyVaultCertificateSourceParametersVault'}, 'secret_name': {'key': 'keyVaultCertificateSourceParameters.secretName', 'type': 'str'}, 'secret_version': {'key': 'keyVaultCertificateSourceParameters.secretVersion', 'type': 'str'}, - 'certificate_type': {'key': 'frontDoorCertificateSourceParameters.certificateType', 'type': 'str'}, } - protocol_type = "ServerNameIndication" - - def __init__(self, *, certificate_source, minimum_tls_version, vault=None, secret_name: str=None, secret_version: str=None, certificate_type=None, **kwargs) -> None: + def __init__( + self, + *, + certificate_source: Union[str, "FrontDoorCertificateSource"], + protocol_type: Union[str, "FrontDoorTlsProtocolType"], + minimum_tls_version: Union[str, "MinimumTLSVersion"], + certificate_type: Optional[Union[str, "FrontDoorCertificateType"]] = None, + vault: Optional["KeyVaultCertificateSourceParametersVault"] = None, + secret_name: Optional[str] = None, + secret_version: Optional[str] = None, + **kwargs + ): super(CustomHttpsConfiguration, self).__init__(**kwargs) self.certificate_source = certificate_source + self.protocol_type = protocol_type self.minimum_tls_version = minimum_tls_version + self.certificate_type = certificate_type self.vault = vault self.secret_name = secret_name self.secret_version = secret_version - self.certificate_type = certificate_type -class CustomRule(Model): +class CustomRule(msrest.serialization.Model): """Defines contents of a web application rule. All required parameters must be populated in order to send to Azure. :param name: Describes the name of the rule. :type name: str - :param priority: Required. Describes priority of the rule. Rules with a - lower value will be evaluated before rules with a higher value. + :param priority: Required. Describes priority of the rule. Rules with a lower value will be + evaluated before rules with a higher value. :type priority: int - :param enabled_state: Describes if the custom rule is in enabled or - disabled state. Defaults to Enabled if not specified. Possible values - include: 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.CustomRuleEnabledState - :param rule_type: Required. Describes type of rule. Possible values - include: 'MatchRule', 'RateLimitRule' + :param enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to + Enabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.CustomRuleEnabledState + :param rule_type: Required. Describes type of rule. Possible values include: "MatchRule", + "RateLimitRule". :type rule_type: str or ~azure.mgmt.frontdoor.models.RuleType - :param rate_limit_duration_in_minutes: Time window for resetting the rate - limit count. Default is 1 minute. + :param rate_limit_duration_in_minutes: Time window for resetting the rate limit count. Default + is 1 minute. :type rate_limit_duration_in_minutes: int - :param rate_limit_threshold: Number of allowed requests per client within - the time window. + :param rate_limit_threshold: Number of allowed requests per client within the time window. :type rate_limit_threshold: int :param match_conditions: Required. List of match conditions. :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition] - :param action: Required. Describes what action to be applied when rule - matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :param action: Required. Describes what action to be applied when rule matches. Possible values + include: "Allow", "Block", "Log", "Redirect". :type action: str or ~azure.mgmt.frontdoor.models.ActionType """ _validation = { - 'name': {'max_length': 128}, + 'name': {'max_length': 128, 'min_length': 0}, 'priority': {'required': True}, 'rule_type': {'required': True}, 'rate_limit_duration_in_minutes': {'maximum': 5, 'minimum': 0}, @@ -456,7 +570,19 @@ class CustomRule(Model): 'action': {'key': 'action', 'type': 'str'}, } - def __init__(self, *, priority: int, rule_type, match_conditions, action, name: str=None, enabled_state=None, rate_limit_duration_in_minutes: int=None, rate_limit_threshold: int=None, **kwargs) -> None: + def __init__( + self, + *, + priority: int, + rule_type: Union[str, "RuleType"], + match_conditions: List["MatchCondition"], + action: Union[str, "ActionType"], + name: Optional[str] = None, + enabled_state: Optional[Union[str, "CustomRuleEnabledState"]] = None, + rate_limit_duration_in_minutes: Optional[int] = None, + rate_limit_threshold: Optional[int] = None, + **kwargs + ): super(CustomRule, self).__init__(**kwargs) self.name = name self.priority = priority @@ -468,10 +594,10 @@ def __init__(self, *, priority: int, rule_type, match_conditions, action, name: self.action = action -class CustomRuleList(Model): +class CustomRuleList(msrest.serialization.Model): """Defines contents of custom rules. - :param rules: List of rules + :param rules: List of rules. :type rules: list[~azure.mgmt.frontdoor.models.CustomRule] """ @@ -479,17 +605,22 @@ class CustomRuleList(Model): 'rules': {'key': 'rules', 'type': '[CustomRule]'}, } - def __init__(self, *, rules=None, **kwargs) -> None: + def __init__( + self, + *, + rules: Optional[List["CustomRule"]] = None, + **kwargs + ): super(CustomRuleList, self).__init__(**kwargs) self.rules = rules -class Endpoint(Model): +class Endpoint(msrest.serialization.Model): """Defines the endpoint properties. - :param name: The name of the endpoint + :param name: The name of the endpoint. :type name: str - :param endpoint: The endpoint URL + :param endpoint: The endpoint URL. :type endpoint: str """ @@ -498,13 +629,19 @@ class Endpoint(Model): 'endpoint': {'key': 'endpoint', 'type': 'str'}, } - def __init__(self, *, name: str=None, endpoint: str=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[str] = None, + endpoint: Optional[str] = None, + **kwargs + ): super(Endpoint, self).__init__(**kwargs) self.name = name self.endpoint = endpoint -class Error(Model): +class Error(msrest.serialization.Model): """Error. :param code: @@ -527,7 +664,16 @@ class Error(Model): 'inner_error': {'key': 'innerError', 'type': 'str'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, inner_error: str=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["ErrorDetails"]] = None, + inner_error: Optional[str] = None, + **kwargs + ): super(Error, self).__init__(**kwargs) self.code = code self.message = message @@ -536,7 +682,7 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai self.inner_error = inner_error -class ErrorDetails(Model): +class ErrorDetails(msrest.serialization.Model): """ErrorDetails. :param code: @@ -553,19 +699,24 @@ class ErrorDetails(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, code: str=None, target: str=None, message: str=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): super(ErrorDetails, self).__init__(**kwargs) self.code = code self.target = target self.message = message -class ErrorResponse(Model): - """Error response indicates Front Door service is not able to process the - incoming request. The reason is provided in the error message. +class ErrorResponse(msrest.serialization.Model): + """Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Error code. :vartype code: str @@ -583,29 +734,19 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - -class Resource(Model): +class Resource(msrest.serialization.Model): """Common resource representation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -615,7 +756,7 @@ class Resource(Model): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -633,7 +774,13 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -645,8 +792,7 @@ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: class Experiment(Resource): """Defines the properties of an Experiment. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -656,25 +802,23 @@ class Experiment(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the details or intents of the - Experiment + :param description: The description of the details or intents of the Experiment. :type description: str - :param endpoint_a: The endpoint A of an experiment + :param endpoint_a: The endpoint A of an experiment. :type endpoint_a: ~azure.mgmt.frontdoor.models.Endpoint - :param endpoint_b: The endpoint B of an experiment + :param endpoint_b: The endpoint B of an experiment. :type endpoint_b: ~azure.mgmt.frontdoor.models.Endpoint - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState - :ivar status: The description of Experiment status from the server side + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState + :ivar status: The description of Experiment status from the server side. :vartype status: str - :ivar script_file_uri: The uri to the Script used in the Experiment + :ivar script_file_uri: The uri to the Script used in the Experiment. :vartype script_file_uri: str """ @@ -682,6 +826,7 @@ class Experiment(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'status': {'readonly': True}, 'script_file_uri': {'readonly': True}, } @@ -701,27 +846,67 @@ class Experiment(Resource): 'script_file_uri': {'key': 'properties.scriptFileUri', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, description: str=None, endpoint_a=None, endpoint_b=None, enabled_state=None, resource_state=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + endpoint_a: Optional["Endpoint"] = None, + endpoint_b: Optional["Endpoint"] = None, + enabled_state: Optional[Union[str, "State"]] = None, + **kwargs + ): super(Experiment, self).__init__(location=location, tags=tags, **kwargs) self.description = description self.endpoint_a = endpoint_a self.endpoint_b = endpoint_b self.enabled_state = enabled_state - self.resource_state = resource_state + self.resource_state = None self.status = None self.script_file_uri = None -class ExperimentUpdateModel(Model): +class ExperimentList(msrest.serialization.Model): + """Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiments within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.Experiment] + :param next_link: URL to get the next set of Experiment objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Experiment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(ExperimentList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class ExperimentUpdateModel(msrest.serialization.Model): """Defines modifiable attributes of an Experiment. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the intent or details of the - Experiment + :param description: The description of the intent or details of the Experiment. :type description: str - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ @@ -731,40 +916,50 @@ class ExperimentUpdateModel(Model): 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, } - def __init__(self, *, tags=None, description: str=None, enabled_state=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + enabled_state: Optional[Union[str, "State"]] = None, + **kwargs + ): super(ExperimentUpdateModel, self).__init__(**kwargs) self.tags = tags self.description = description self.enabled_state = enabled_state -class RouteConfiguration(Model): +class RouteConfiguration(msrest.serialization.Model): """Base class for all types of Route. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ForwardingConfiguration, RedirectConfiguration + sub-classes are: ForwardingConfiguration, RedirectConfiguration. All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, } _subtype_map = { - 'odatatype': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} + 'odata_type': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(RouteConfiguration, self).__init__(**kwargs) - self.odatatype = None + self.odata_type = None # type: Optional[str] class ForwardingConfiguration(RouteConfiguration): @@ -772,51 +967,53 @@ class ForwardingConfiguration(RouteConfiguration): All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param custom_forwarding_path: A custom path used to rewrite resource paths matched by this + rule. Leave empty to use incoming path. :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. + :param forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. + Possible values include: "HttpOnly", "HttpsOnly", "MatchRequest". + :type forwarding_protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol + :param cache_configuration: The caching configuration associated with this rule. :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. + :param backend_pool: A reference to the BackendPool which this rule routes to. :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, } - def __init__(self, *, custom_forwarding_path: str=None, forwarding_protocol=None, cache_configuration=None, backend_pool=None, **kwargs) -> None: + def __init__( + self, + *, + custom_forwarding_path: Optional[str] = None, + forwarding_protocol: Optional[Union[str, "FrontDoorForwardingProtocol"]] = None, + cache_configuration: Optional["CacheConfiguration"] = None, + backend_pool: Optional["SubResource"] = None, + **kwargs + ): super(ForwardingConfiguration, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' # type: str self.custom_forwarding_path = custom_forwarding_path self.forwarding_protocol = forwarding_protocol self.cache_configuration = cache_configuration self.backend_pool = backend_pool - self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' class FrontDoor(Resource): - """Front Door represents a collection of backend endpoints to route traffic to - along with rules that specify how traffic is sent there. + """Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is sent there. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -826,50 +1023,48 @@ class FrontDoor(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param friendly_name: A friendly name for the frontDoor + :param friendly_name: A friendly name for the frontDoor. :type friendly_name: str :param routing_rules: Routing rules associated with this Front Door. :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param load_balancing_settings: Load balancing settings associated with - this Front Door instance. - :type load_balancing_settings: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param health_probe_settings: Health probe settings associated with this - Front Door instance. - :type health_probe_settings: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] :param backend_pools: Backend pools available to routing rules. :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] :param frontend_endpoints: Frontend endpoints available to routing rules. - :type frontend_endpoints: - list[~azure.mgmt.frontdoor.models.FrontendEndpoint] - :param backend_pools_settings: Settings for all backendPools - :type backend_pools_settings: - ~azure.mgmt.frontdoor.models.BackendPoolsSettings - :param enabled_state: Operational status of the Front Door load balancer. - Permitted values are 'Enabled' or 'Disabled'. Possible values include: - 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState - :param resource_state: Resource status of the Front Door. Possible values - include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', - 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :ivar resource_state: Resource status of the Front Door. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState :ivar provisioning_state: Provisioning state of the Front Door. :vartype provisioning_state: str :ivar cname: The host that each frontendEndpoint must CNAME to. :vartype cname: str + :ivar frontdoor_id: The Id of the frontdoor. + :vartype frontdoor_id: str + :ivar rules_engines: Rules Engine Configurations available to routing rules. + :vartype rules_engines: list[~azure.mgmt.frontdoor.models.RulesEngine] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'cname': {'readonly': True}, + 'frontdoor_id': {'readonly': True}, + 'rules_engines': {'readonly': True}, } _attribute_map = { @@ -889,9 +1084,25 @@ class FrontDoor(Resource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cname': {'key': 'properties.cname', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, backend_pools_settings=None, enabled_state=None, resource_state=None, **kwargs) -> None: + 'frontdoor_id': {'key': 'properties.frontdoorId', 'type': 'str'}, + 'rules_engines': {'key': 'properties.rulesEngines', 'type': '[RulesEngine]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + friendly_name: Optional[str] = None, + routing_rules: Optional[List["RoutingRule"]] = None, + load_balancing_settings: Optional[List["LoadBalancingSettingsModel"]] = None, + health_probe_settings: Optional[List["HealthProbeSettingsModel"]] = None, + backend_pools: Optional[List["BackendPool"]] = None, + frontend_endpoints: Optional[List["FrontendEndpoint"]] = None, + backend_pools_settings: Optional["BackendPoolsSettings"] = None, + enabled_state: Optional[Union[str, "FrontDoorEnabledState"]] = None, + **kwargs + ): super(FrontDoor, self).__init__(location=location, tags=tags, **kwargs) self.friendly_name = friendly_name self.routing_rules = routing_rules @@ -901,39 +1112,65 @@ def __init__(self, *, location: str=None, tags=None, friendly_name: str=None, ro self.frontend_endpoints = frontend_endpoints self.backend_pools_settings = backend_pools_settings self.enabled_state = enabled_state - self.resource_state = resource_state + self.resource_state = None self.provisioning_state = None self.cname = None + self.frontdoor_id = None + self.rules_engines = None + + +class FrontDoorListResult(msrest.serialization.Model): + """Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Front Doors within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.FrontDoor] + :param next_link: URL to get the next set of Front Door objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontDoor]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(FrontDoorListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link -class FrontDoorUpdateParameters(Model): +class FrontDoorUpdateParameters(msrest.serialization.Model): """The properties needed to update a Front Door. - :param friendly_name: A friendly name for the frontDoor + :param friendly_name: A friendly name for the frontDoor. :type friendly_name: str :param routing_rules: Routing rules associated with this Front Door. :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param load_balancing_settings: Load balancing settings associated with - this Front Door instance. - :type load_balancing_settings: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param health_probe_settings: Health probe settings associated with this - Front Door instance. - :type health_probe_settings: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] :param backend_pools: Backend pools available to routing rules. :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] :param frontend_endpoints: Frontend endpoints available to routing rules. - :type frontend_endpoints: - list[~azure.mgmt.frontdoor.models.FrontendEndpoint] - :param backend_pools_settings: Settings for all backendPools - :type backend_pools_settings: - ~azure.mgmt.frontdoor.models.BackendPoolsSettings - :param enabled_state: Operational status of the Front Door load balancer. - Permitted values are 'Enabled' or 'Disabled'. Possible values include: - 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState """ _attribute_map = { @@ -947,7 +1184,19 @@ class FrontDoorUpdateParameters(Model): 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } - def __init__(self, *, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, backend_pools_settings=None, enabled_state=None, **kwargs) -> None: + def __init__( + self, + *, + friendly_name: Optional[str] = None, + routing_rules: Optional[List["RoutingRule"]] = None, + load_balancing_settings: Optional[List["LoadBalancingSettingsModel"]] = None, + health_probe_settings: Optional[List["HealthProbeSettingsModel"]] = None, + backend_pools: Optional[List["BackendPool"]] = None, + frontend_endpoints: Optional[List["FrontendEndpoint"]] = None, + backend_pools_settings: Optional["BackendPoolsSettings"] = None, + enabled_state: Optional[Union[str, "FrontDoorEnabledState"]] = None, + **kwargs + ): super(FrontDoorUpdateParameters, self).__init__(**kwargs) self.friendly_name = friendly_name self.routing_rules = routing_rules @@ -959,68 +1208,143 @@ def __init__(self, *, friendly_name: str=None, routing_rules=None, load_balancin self.enabled_state = enabled_state +class FrontDoorProperties(FrontDoorUpdateParameters): + """The JSON object that contains the properties required to create an endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param friendly_name: A friendly name for the frontDoor. + :type friendly_name: str + :param routing_rules: Routing rules associated with this Front Door. + :type routing_rules: list[~azure.mgmt.frontdoor.models.RoutingRule] + :param load_balancing_settings: Load balancing settings associated with this Front Door + instance. + :type load_balancing_settings: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param health_probe_settings: Health probe settings associated with this Front Door instance. + :type health_probe_settings: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param backend_pools: Backend pools available to routing rules. + :type backend_pools: list[~azure.mgmt.frontdoor.models.BackendPool] + :param frontend_endpoints: Frontend endpoints available to routing rules. + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools. + :type backend_pools_settings: ~azure.mgmt.frontdoor.models.BackendPoolsSettings + :param enabled_state: Operational status of the Front Door load balancer. Permitted values are + 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + :ivar resource_state: Resource status of the Front Door. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar provisioning_state: Provisioning state of the Front Door. + :vartype provisioning_state: str + :ivar cname: The host that each frontendEndpoint must CNAME to. + :vartype cname: str + :ivar frontdoor_id: The Id of the frontdoor. + :vartype frontdoor_id: str + :ivar rules_engines: Rules Engine Configurations available to routing rules. + :vartype rules_engines: list[~azure.mgmt.frontdoor.models.RulesEngine] + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'cname': {'readonly': True}, + 'frontdoor_id': {'readonly': True}, + 'rules_engines': {'readonly': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'routing_rules': {'key': 'routingRules', 'type': '[RoutingRule]'}, + 'load_balancing_settings': {'key': 'loadBalancingSettings', 'type': '[LoadBalancingSettingsModel]'}, + 'health_probe_settings': {'key': 'healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, + 'backend_pools': {'key': 'backendPools', 'type': '[BackendPool]'}, + 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'backendPoolsSettings', 'type': 'BackendPoolsSettings'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'frontdoor_id': {'key': 'frontdoorId', 'type': 'str'}, + 'rules_engines': {'key': 'rulesEngines', 'type': '[RulesEngine]'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + routing_rules: Optional[List["RoutingRule"]] = None, + load_balancing_settings: Optional[List["LoadBalancingSettingsModel"]] = None, + health_probe_settings: Optional[List["HealthProbeSettingsModel"]] = None, + backend_pools: Optional[List["BackendPool"]] = None, + frontend_endpoints: Optional[List["FrontendEndpoint"]] = None, + backend_pools_settings: Optional["BackendPoolsSettings"] = None, + enabled_state: Optional[Union[str, "FrontDoorEnabledState"]] = None, + **kwargs + ): + super(FrontDoorProperties, self).__init__(friendly_name=friendly_name, routing_rules=routing_rules, load_balancing_settings=load_balancing_settings, health_probe_settings=health_probe_settings, backend_pools=backend_pools, frontend_endpoints=frontend_endpoints, backend_pools_settings=backend_pools_settings, enabled_state=enabled_state, **kwargs) + self.resource_state = None + self.provisioning_state = None + self.cname = None + self.frontdoor_id = None + self.rules_engines = None + + class FrontendEndpoint(SubResource): """A frontend endpoint used for routing. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param host_name: The host name of the frontendEndpoint. Must be a domain - name. + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param host_name: The host name of the frontendEndpoint. Must be a domain name. :type host_name: str - :param session_affinity_enabled_state: Whether to allow session affinity - on this host. Valid options are 'Enabled' or 'Disabled'. Possible values - include: 'Enabled', 'Disabled' + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :type session_affinity_enabled_state: str or ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState - :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. - The TTL to use in seconds for session affinity, if applicable. + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. :type session_affinity_ttl_seconds: int - :param web_application_firewall_policy_link: Defines the Web Application - Firewall policy for each host (if applicable) + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). :type web_application_firewall_policy_link: ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState - :ivar custom_https_provisioning_state: Provisioning status of Custom Https - of the frontendEndpoint. Possible values include: 'Enabling', 'Enabled', - 'Disabling', 'Disabled', 'Failed' + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https of the + frontendEndpoint. Possible values include: "Enabling", "Enabled", "Disabling", "Disabled", + "Failed". :vartype custom_https_provisioning_state: str or ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningState - :ivar custom_https_provisioning_substate: Provisioning substate shows the - progress of custom HTTPS enabling/disabling process step by step. Possible - values include: 'SubmittingDomainControlValidationRequest', - 'PendingDomainControlValidationREquestApproval', - 'DomainControlValidationRequestApproved', - 'DomainControlValidationRequestRejected', - 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', - 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - 'CertificateDeleted' + :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom + HTTPS enabling/disabling process step by step. Possible values include: + "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", + "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", + "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", + "CertificateDeployed", "DeletingCertificate", "CertificateDeleted". :vartype custom_https_provisioning_substate: str or ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningSubstate - :ivar custom_https_configuration: The configuration specifying how to - enable HTTPS - :vartype custom_https_configuration: - ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration - :param name: Resource name. - :type name: str - :ivar type: Resource type. - :vartype type: str + :ivar custom_https_configuration: The configuration specifying how to enable HTTPS. + :vartype custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration """ _validation = { + 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, 'custom_https_provisioning_state': {'readonly': True}, 'custom_https_provisioning_substate': {'readonly': True}, 'custom_https_configuration': {'readonly': True}, - 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'session_affinity_enabled_state': {'key': 'properties.sessionAffinityEnabledState', 'type': 'str'}, 'session_affinity_ttl_seconds': {'key': 'properties.sessionAffinityTtlSeconds', 'type': 'int'}, @@ -1029,25 +1353,33 @@ class FrontendEndpoint(SubResource): 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, 'custom_https_configuration': {'key': 'properties.customHttpsConfiguration', 'type': 'CustomHttpsConfiguration'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, host_name: str=None, session_affinity_enabled_state=None, session_affinity_ttl_seconds: int=None, web_application_firewall_policy_link=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + host_name: Optional[str] = None, + session_affinity_enabled_state: Optional[Union[str, "SessionAffinityEnabledState"]] = None, + session_affinity_ttl_seconds: Optional[int] = None, + web_application_firewall_policy_link: Optional["FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): super(FrontendEndpoint, self).__init__(id=id, **kwargs) + self.name = name + self.type = None self.host_name = host_name self.session_affinity_enabled_state = session_affinity_enabled_state self.session_affinity_ttl_seconds = session_affinity_ttl_seconds self.web_application_firewall_policy_link = web_application_firewall_policy_link - self.resource_state = resource_state + self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None self.custom_https_configuration = None - self.name = name - self.type = None -class FrontendEndpointLink(Model): +class FrontendEndpointLink(msrest.serialization.Model): """Defines the Resource ID for a Frontend Endpoint. :param id: Resource ID. @@ -1058,27 +1390,30 @@ class FrontendEndpointLink(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(FrontendEndpointLink, self).__init__(**kwargs) self.id = id -class FrontendEndpointUpdateParameters(Model): +class FrontendEndpointUpdateParameters(msrest.serialization.Model): """Frontend endpoint used in routing rule. - :param host_name: The host name of the frontendEndpoint. Must be a domain - name. + :param host_name: The host name of the frontendEndpoint. Must be a domain name. :type host_name: str - :param session_affinity_enabled_state: Whether to allow session affinity - on this host. Valid options are 'Enabled' or 'Disabled'. Possible values - include: 'Enabled', 'Disabled' + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :type session_affinity_enabled_state: str or ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState - :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. - The TTL to use in seconds for session affinity, if applicable. + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. :type session_affinity_ttl_seconds: int - :param web_application_firewall_policy_link: Defines the Web Application - Firewall policy for each host (if applicable) + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). :type web_application_firewall_policy_link: ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink """ @@ -1090,7 +1425,15 @@ class FrontendEndpointUpdateParameters(Model): 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink'}, } - def __init__(self, *, host_name: str=None, session_affinity_enabled_state=None, session_affinity_ttl_seconds: int=None, web_application_firewall_policy_link=None, **kwargs) -> None: + def __init__( + self, + *, + host_name: Optional[str] = None, + session_affinity_enabled_state: Optional[Union[str, "SessionAffinityEnabledState"]] = None, + session_affinity_ttl_seconds: Optional[int] = None, + web_application_firewall_policy_link: Optional["FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): super(FrontendEndpointUpdateParameters, self).__init__(**kwargs) self.host_name = host_name self.session_affinity_enabled_state = session_affinity_enabled_state @@ -1098,7 +1441,110 @@ def __init__(self, *, host_name: str=None, session_affinity_enabled_state=None, self.web_application_firewall_policy_link = web_application_firewall_policy_link -class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(Model): +class FrontendEndpointProperties(FrontendEndpointUpdateParameters): + """The JSON object that contains the properties required to create a frontend endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param host_name: The host name of the frontendEndpoint. Must be a domain name. + :type host_name: str + :param session_affinity_enabled_state: Whether to allow session affinity on this host. Valid + options are 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". + :type session_affinity_enabled_state: str or + ~azure.mgmt.frontdoor.models.SessionAffinityEnabledState + :param session_affinity_ttl_seconds: UNUSED. This field will be ignored. The TTL to use in + seconds for session affinity, if applicable. + :type session_affinity_ttl_seconds: int + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each host (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https of the + frontendEndpoint. Possible values include: "Enabling", "Enabled", "Disabling", "Disabled", + "Failed". + :vartype custom_https_provisioning_state: str or + ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningState + :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom + HTTPS enabling/disabling process step by step. Possible values include: + "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", + "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", + "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", + "CertificateDeployed", "DeletingCertificate", "CertificateDeleted". + :vartype custom_https_provisioning_substate: str or + ~azure.mgmt.frontdoor.models.CustomHttpsProvisioningSubstate + :ivar custom_https_configuration: The configuration specifying how to enable HTTPS. + :vartype custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'custom_https_provisioning_state': {'readonly': True}, + 'custom_https_provisioning_substate': {'readonly': True}, + 'custom_https_configuration': {'readonly': True}, + } + + _attribute_map = { + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'session_affinity_enabled_state': {'key': 'sessionAffinityEnabledState', 'type': 'str'}, + 'session_affinity_ttl_seconds': {'key': 'sessionAffinityTtlSeconds', 'type': 'int'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'custom_https_provisioning_state': {'key': 'customHttpsProvisioningState', 'type': 'str'}, + 'custom_https_provisioning_substate': {'key': 'customHttpsProvisioningSubstate', 'type': 'str'}, + 'custom_https_configuration': {'key': 'customHttpsConfiguration', 'type': 'CustomHttpsConfiguration'}, + } + + def __init__( + self, + *, + host_name: Optional[str] = None, + session_affinity_enabled_state: Optional[Union[str, "SessionAffinityEnabledState"]] = None, + session_affinity_ttl_seconds: Optional[int] = None, + web_application_firewall_policy_link: Optional["FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): + super(FrontendEndpointProperties, self).__init__(host_name=host_name, session_affinity_enabled_state=session_affinity_enabled_state, session_affinity_ttl_seconds=session_affinity_ttl_seconds, web_application_firewall_policy_link=web_application_firewall_policy_link, **kwargs) + self.resource_state = None + self.custom_https_provisioning_state = None + self.custom_https_provisioning_substate = None + self.custom_https_configuration = None + + +class FrontendEndpointsListResult(msrest.serialization.Model): + """Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Frontend endpoints within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param next_link: URL to get the next set of frontend endpoints if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontendEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(FrontendEndpointsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(msrest.serialization.Model): """Defines the Web Application Firewall policy for each host (if applicable). :param id: Resource ID. @@ -1109,23 +1555,64 @@ class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, self).__init__(**kwargs) self.id = id -class HealthProbeSettingsListResult(Model): - """Result of the request to list HealthProbeSettings. It contains a list of - HealthProbeSettings objects and a URL link to get the next set of results. +class HeaderAction(msrest.serialization.Model): + """An action that can manipulate an http header. + + All required parameters must be populated in order to send to Azure. + + :param header_action_type: Required. Which type of manipulation to apply to the header. + Possible values include: "Append", "Delete", "Overwrite". + :type header_action_type: str or ~azure.mgmt.frontdoor.models.HeaderActionType + :param header_name: Required. The name of the header this action will apply to. + :type header_name: str + :param value: The value to update the given header name with. This value is not used if the + actionType is Delete. + :type value: str + """ + + _validation = { + 'header_action_type': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'header_action_type': {'key': 'headerActionType', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + header_action_type: Union[str, "HeaderActionType"], + header_name: str, + value: Optional[str] = None, + **kwargs + ): + super(HeaderAction, self).__init__(**kwargs) + self.header_action_type = header_action_type + self.header_name = header_name + self.value = value + + +class HealthProbeSettingsListResult(msrest.serialization.Model): + """Result of the request to list HealthProbeSettings. It contains a list of HealthProbeSettings objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of HealthProbeSettings within a Front Door. - :vartype value: - list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] - :param next_link: URL to get the next set of HealthProbeSettings objects - if there are any. + :vartype value: list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param next_link: URL to get the next set of HealthProbeSettings objects if there are any. :type next_link: str """ @@ -1138,7 +1625,12 @@ class HealthProbeSettingsListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, *, next_link: str=None, **kwargs) -> None: + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): super(HealthProbeSettingsListResult, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1147,88 +1639,90 @@ def __init__(self, *, next_link: str=None, **kwargs) -> None: class HealthProbeSettingsModel(SubResource): """Load balancing settings for a backend pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param path: The path to use for the health probe. Default is / - :type path: str - :param protocol: Protocol scheme to use for this probe. Possible values - include: 'Http', 'Https' - :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol - :param interval_in_seconds: The number of seconds between health probes. - :type interval_in_seconds: int - :param health_probe_method: Configures which HTTP method to use to probe - the backends defined under backendPools. Possible values include: 'GET', - 'HEAD'. Default value: "HEAD" . - :type health_probe_method: str or - ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod - :param enabled_state: Whether to enable health probes to be made against - backends defined under backendPools. Health probes can only be disabled if - there is a single enabled backend in single enabled backend pool. Possible - values include: 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.HealthProbeEnabled - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str + :param path: The path to use for the health probe. Default is /. + :type path: str + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". + :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol + :param interval_in_seconds: The number of seconds between health probes. + :type interval_in_seconds: int + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, 'protocol': {'key': 'properties.protocol', 'type': 'str'}, 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, 'health_probe_method': {'key': 'properties.healthProbeMethod', 'type': 'str'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, path: str=None, protocol=None, interval_in_seconds: int=None, health_probe_method="HEAD", enabled_state=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + path: Optional[str] = None, + protocol: Optional[Union[str, "FrontDoorProtocol"]] = None, + interval_in_seconds: Optional[int] = None, + health_probe_method: Optional[Union[str, "FrontDoorHealthProbeMethod"]] = "HEAD", + enabled_state: Optional[Union[str, "HealthProbeEnabled"]] = None, + **kwargs + ): super(HealthProbeSettingsModel, self).__init__(id=id, **kwargs) + self.name = name + self.type = None self.path = path self.protocol = protocol self.interval_in_seconds = interval_in_seconds self.health_probe_method = health_probe_method self.enabled_state = enabled_state - self.resource_state = resource_state - self.name = name - self.type = None + self.resource_state = None -class HealthProbeSettingsUpdateParameters(Model): +class HealthProbeSettingsUpdateParameters(msrest.serialization.Model): """L7 health probe settings for a backend pool. - :param path: The path to use for the health probe. Default is / + :param path: The path to use for the health probe. Default is /. :type path: str - :param protocol: Protocol scheme to use for this probe. Possible values - include: 'Http', 'Https' + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol :param interval_in_seconds: The number of seconds between health probes. :type interval_in_seconds: int - :param health_probe_method: Configures which HTTP method to use to probe - the backends defined under backendPools. Possible values include: 'GET', - 'HEAD'. Default value: "HEAD" . - :type health_probe_method: str or - ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod - :param enabled_state: Whether to enable health probes to be made against - backends defined under backendPools. Health probes can only be disabled if - there is a single enabled backend in single enabled backend pool. Possible - values include: 'Enabled', 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled """ _attribute_map = { @@ -1239,7 +1733,16 @@ class HealthProbeSettingsUpdateParameters(Model): 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } - def __init__(self, *, path: str=None, protocol=None, interval_in_seconds: int=None, health_probe_method="HEAD", enabled_state=None, **kwargs) -> None: + def __init__( + self, + *, + path: Optional[str] = None, + protocol: Optional[Union[str, "FrontDoorProtocol"]] = None, + interval_in_seconds: Optional[int] = None, + health_probe_method: Optional[Union[str, "FrontDoorHealthProbeMethod"]] = "HEAD", + enabled_state: Optional[Union[str, "HealthProbeEnabled"]] = None, + **kwargs + ): super(HealthProbeSettingsUpdateParameters, self).__init__(**kwargs) self.path = path self.protocol = protocol @@ -1248,7 +1751,58 @@ def __init__(self, *, path: str=None, protocol=None, interval_in_seconds: int=No self.enabled_state = enabled_state -class KeyVaultCertificateSourceParametersVault(Model): +class HealthProbeSettingsProperties(HealthProbeSettingsUpdateParameters): + """The JSON object that contains the properties required to create a health probe settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param path: The path to use for the health probe. Default is /. + :type path: str + :param protocol: Protocol scheme to use for this probe. Possible values include: "Http", + "Https". + :type protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol + :param interval_in_seconds: The number of seconds between health probes. + :type interval_in_seconds: int + :param health_probe_method: Configures which HTTP method to use to probe the backends defined + under backendPools. Possible values include: "GET", "HEAD". Default value: "HEAD". + :type health_probe_method: str or ~azure.mgmt.frontdoor.models.FrontDoorHealthProbeMethod + :param enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.HealthProbeEnabled + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'health_probe_method': {'key': 'healthProbeMethod', 'type': 'str'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + protocol: Optional[Union[str, "FrontDoorProtocol"]] = None, + interval_in_seconds: Optional[int] = None, + health_probe_method: Optional[Union[str, "FrontDoorHealthProbeMethod"]] = "HEAD", + enabled_state: Optional[Union[str, "HealthProbeEnabled"]] = None, + **kwargs + ): + super(HealthProbeSettingsProperties, self).__init__(path=path, protocol=protocol, interval_in_seconds=interval_in_seconds, health_probe_method=health_probe_method, enabled_state=enabled_state, **kwargs) + self.resource_state = None + + +class KeyVaultCertificateSourceParametersVault(msrest.serialization.Model): """The Key Vault containing the SSL certificate. :param id: Resource ID. @@ -1259,40 +1813,40 @@ class KeyVaultCertificateSourceParametersVault(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(KeyVaultCertificateSourceParametersVault, self).__init__(**kwargs) self.id = id -class LatencyMetric(Model): +class LatencyMetric(msrest.serialization.Model): """Defines the properties of a latency metric used in the latency scorecard. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the Latency Metric + :ivar name: The name of the Latency Metric. :vartype name: str - :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC + :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC. :vartype end_date_time_utc: str - :ivar a_value: The metric value of the A endpoint + :ivar a_value: The metric value of the A endpoint. :vartype a_value: float - :ivar b_value: The metric value of the B endpoint + :ivar b_value: The metric value of the B endpoint. :vartype b_value: float - :ivar delta: The difference in value between endpoint A and B + :ivar delta: The difference in value between endpoint A and B. :vartype delta: float - :ivar delta_percent: The percent difference between endpoint A and B + :ivar delta_percent: The percent difference between endpoint A and B. :vartype delta_percent: float - :ivar a_clower95_ci: The lower end of the 95% confidence interval for - endpoint A - :vartype a_clower95_ci: float - :ivar a_hupper95_ci: The upper end of the 95% confidence interval for - endpoint A - :vartype a_hupper95_ci: float - :ivar b_clower95_ci: The lower end of the 95% confidence interval for - endpoint B - :vartype b_clower95_ci: float - :ivar b_upper95_ci: The upper end of the 95% confidence interval for - endpoint B + :ivar a_c_lower95_ci: The lower end of the 95% confidence interval for endpoint A. + :vartype a_c_lower95_ci: float + :ivar a_h_upper95_ci: The upper end of the 95% confidence interval for endpoint A. + :vartype a_h_upper95_ci: float + :ivar b_c_lower95_ci: The lower end of the 95% confidence interval for endpoint B. + :vartype b_c_lower95_ci: float + :ivar b_upper95_ci: The upper end of the 95% confidence interval for endpoint B. :vartype b_upper95_ci: float """ @@ -1303,9 +1857,9 @@ class LatencyMetric(Model): 'b_value': {'readonly': True}, 'delta': {'readonly': True}, 'delta_percent': {'readonly': True}, - 'a_clower95_ci': {'readonly': True}, - 'a_hupper95_ci': {'readonly': True}, - 'b_clower95_ci': {'readonly': True}, + 'a_c_lower95_ci': {'readonly': True}, + 'a_h_upper95_ci': {'readonly': True}, + 'b_c_lower95_ci': {'readonly': True}, 'b_upper95_ci': {'readonly': True}, } @@ -1316,13 +1870,16 @@ class LatencyMetric(Model): 'b_value': {'key': 'bValue', 'type': 'float'}, 'delta': {'key': 'delta', 'type': 'float'}, 'delta_percent': {'key': 'deltaPercent', 'type': 'float'}, - 'a_clower95_ci': {'key': 'aCLower95CI', 'type': 'float'}, - 'a_hupper95_ci': {'key': 'aHUpper95CI', 'type': 'float'}, - 'b_clower95_ci': {'key': 'bCLower95CI', 'type': 'float'}, + 'a_c_lower95_ci': {'key': 'aCLower95CI', 'type': 'float'}, + 'a_h_upper95_ci': {'key': 'aHUpper95CI', 'type': 'float'}, + 'b_c_lower95_ci': {'key': 'bCLower95CI', 'type': 'float'}, 'b_upper95_ci': {'key': 'bUpper95CI', 'type': 'float'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(LatencyMetric, self).__init__(**kwargs) self.name = None self.end_date_time_utc = None @@ -1330,17 +1887,16 @@ def __init__(self, **kwargs) -> None: self.b_value = None self.delta = None self.delta_percent = None - self.a_clower95_ci = None - self.a_hupper95_ci = None - self.b_clower95_ci = None + self.a_c_lower95_ci = None + self.a_h_upper95_ci = None + self.b_c_lower95_ci = None self.b_upper95_ci = None class LatencyScorecard(Resource): """Defines the LatencyScorecard. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1350,27 +1906,26 @@ class LatencyScorecard(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar latency_scorecard_id: The unique identifier of the Latency Scorecard - :vartype latency_scorecard_id: str - :ivar latency_scorecard_name: The name of the Latency Scorecard - :vartype latency_scorecard_name: str - :ivar description: The description of the Latency Scorecard + :ivar id_properties_id: The unique identifier of the Latency Scorecard. + :vartype id_properties_id: str + :ivar name_properties_name: The name of the Latency Scorecard. + :vartype name_properties_name: str + :ivar description: The description of the Latency Scorecard. :vartype description: str - :ivar endpoint_a: The A endpoint in the scorecard + :ivar endpoint_a: The A endpoint in the scorecard. :vartype endpoint_a: str - :ivar endpoint_b: The B endpoint in the scorecard + :ivar endpoint_b: The B endpoint in the scorecard. :vartype endpoint_b: str - :ivar start_date_time_utc: The start time of the Latency Scorecard in UTC - :vartype start_date_time_utc: datetime - :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC - :vartype end_date_time_utc: datetime - :ivar country: The country associated with the Latency Scorecard. Values - are country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :ivar start_date_time_utc: The start time of the Latency Scorecard in UTC. + :vartype start_date_time_utc: ~datetime.datetime + :ivar end_date_time_utc: The end time of the Latency Scorecard in UTC. + :vartype end_date_time_utc: ~datetime.datetime + :ivar country: The country associated with the Latency Scorecard. Values are country ISO codes + as specified here- https://www.iso.org/iso-3166-country-codes.html. :vartype country: str - :param latency_metrics: The latency metrics of the Latency Scorecard + :param latency_metrics: The latency metrics of the Latency Scorecard. :type latency_metrics: list[~azure.mgmt.frontdoor.models.LatencyMetric] """ @@ -1378,8 +1933,8 @@ class LatencyScorecard(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'latency_scorecard_id': {'readonly': True}, - 'latency_scorecard_name': {'readonly': True}, + 'id_properties_id': {'readonly': True}, + 'name_properties_name': {'readonly': True}, 'description': {'readonly': True}, 'endpoint_a': {'readonly': True}, 'endpoint_b': {'readonly': True}, @@ -1394,8 +1949,8 @@ class LatencyScorecard(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'latency_scorecard_id': {'key': 'properties.id', 'type': 'str'}, - 'latency_scorecard_name': {'key': 'properties.name', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'endpoint_a': {'key': 'properties.endpointA', 'type': 'str'}, 'endpoint_b': {'key': 'properties.endpointB', 'type': 'str'}, @@ -1405,10 +1960,17 @@ class LatencyScorecard(Resource): 'latency_metrics': {'key': 'properties.latencyMetrics', 'type': '[LatencyMetric]'}, } - def __init__(self, *, location: str=None, tags=None, latency_metrics=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + latency_metrics: Optional[List["LatencyMetric"]] = None, + **kwargs + ): super(LatencyScorecard, self).__init__(location=location, tags=tags, **kwargs) - self.latency_scorecard_id = None - self.latency_scorecard_name = None + self.id_properties_id = None + self.name_properties_name = None self.description = None self.endpoint_a = None self.endpoint_b = None @@ -1418,19 +1980,14 @@ def __init__(self, *, location: str=None, tags=None, latency_metrics=None, **kwa self.latency_metrics = latency_metrics -class LoadBalancingSettingsListResult(Model): - """Result of the request to list load balancing settings. It contains a list - of load balancing settings objects and a URL link to get the next set of - results. +class LoadBalancingSettingsListResult(msrest.serialization.Model): + """Result of the request to list load balancing settings. It contains a list of load balancing settings objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Backend Pools within a Front Door. - :vartype value: - list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :param next_link: URL to get the next set of LoadBalancingSettings objects - if there are any. + :vartype value: list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param next_link: URL to get the next set of LoadBalancingSettings objects if there are any. :type next_link: str """ @@ -1443,7 +2000,12 @@ class LoadBalancingSettingsListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, *, next_link: str=None, **kwargs) -> None: + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): super(LoadBalancingSettingsListResult, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1452,65 +2014,71 @@ def __init__(self, *, next_link: str=None, **kwargs) -> None: class LoadBalancingSettingsModel(SubResource): """Load balancing settings for a backend pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param sample_size: The number of samples to consider for load balancing - decisions - :type sample_size: int - :param successful_samples_required: The number of samples within the - sample period that must succeed - :type successful_samples_required: int - :param additional_latency_milliseconds: The additional latency in - milliseconds for probes to fall into the lowest latency bucket - :type additional_latency_milliseconds: int - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState :param name: Resource name. :type name: str :ivar type: Resource type. :vartype type: str + :param sample_size: The number of samples to consider for load balancing decisions. + :type sample_size: int + :param successful_samples_required: The number of samples within the sample period that must + succeed. + :type successful_samples_required: int + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. + :type additional_latency_milliseconds: int + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'sample_size': {'key': 'properties.sampleSize', 'type': 'int'}, 'successful_samples_required': {'key': 'properties.successfulSamplesRequired', 'type': 'int'}, 'additional_latency_milliseconds': {'key': 'properties.additionalLatencyMilliseconds', 'type': 'int'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, sample_size: int=None, successful_samples_required: int=None, additional_latency_milliseconds: int=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + additional_latency_milliseconds: Optional[int] = None, + **kwargs + ): super(LoadBalancingSettingsModel, self).__init__(id=id, **kwargs) + self.name = name + self.type = None self.sample_size = sample_size self.successful_samples_required = successful_samples_required self.additional_latency_milliseconds = additional_latency_milliseconds - self.resource_state = resource_state - self.name = name - self.type = None + self.resource_state = None -class LoadBalancingSettingsUpdateParameters(Model): +class LoadBalancingSettingsUpdateParameters(msrest.serialization.Model): """Round-Robin load balancing settings for a backend pool. - :param sample_size: The number of samples to consider for load balancing - decisions + :param sample_size: The number of samples to consider for load balancing decisions. :type sample_size: int - :param successful_samples_required: The number of samples within the - sample period that must succeed + :param successful_samples_required: The number of samples within the sample period that must + succeed. :type successful_samples_required: int - :param additional_latency_milliseconds: The additional latency in - milliseconds for probes to fall into the lowest latency bucket + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. :type additional_latency_milliseconds: int """ @@ -1520,28 +2088,73 @@ class LoadBalancingSettingsUpdateParameters(Model): 'additional_latency_milliseconds': {'key': 'additionalLatencyMilliseconds', 'type': 'int'}, } - def __init__(self, *, sample_size: int=None, successful_samples_required: int=None, additional_latency_milliseconds: int=None, **kwargs) -> None: + def __init__( + self, + *, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + additional_latency_milliseconds: Optional[int] = None, + **kwargs + ): super(LoadBalancingSettingsUpdateParameters, self).__init__(**kwargs) self.sample_size = sample_size self.successful_samples_required = successful_samples_required self.additional_latency_milliseconds = additional_latency_milliseconds -class ManagedRuleDefinition(Model): +class LoadBalancingSettingsProperties(LoadBalancingSettingsUpdateParameters): + """The JSON object that contains the properties required to create load balancing settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param sample_size: The number of samples to consider for load balancing decisions. + :type sample_size: int + :param successful_samples_required: The number of samples within the sample period that must + succeed. + :type successful_samples_required: int + :param additional_latency_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. + :type additional_latency_milliseconds: int + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'sample_size': {'key': 'sampleSize', 'type': 'int'}, + 'successful_samples_required': {'key': 'successfulSamplesRequired', 'type': 'int'}, + 'additional_latency_milliseconds': {'key': 'additionalLatencyMilliseconds', 'type': 'int'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + *, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + additional_latency_milliseconds: Optional[int] = None, + **kwargs + ): + super(LoadBalancingSettingsProperties, self).__init__(sample_size=sample_size, successful_samples_required=successful_samples_required, additional_latency_milliseconds=additional_latency_milliseconds, **kwargs) + self.resource_state = None + + +class ManagedRuleDefinition(msrest.serialization.Model): """Describes a managed rule definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar rule_id: Identifier for the managed rule. :vartype rule_id: str - :ivar default_state: Describes the default state for the managed rule. - Possible values include: 'Disabled', 'Enabled' - :vartype default_state: str or - ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState - :ivar default_action: Describes the default action to be applied when the - managed rule matches. Possible values include: 'Allow', 'Block', 'Log', - 'Redirect' + :ivar default_state: Describes the default state for the managed rule. Possible values include: + "Disabled", "Enabled". + :vartype default_state: str or ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :ivar default_action: Describes the default action to be applied when the managed rule matches. + Possible values include: "Allow", "Block", "Log", "Redirect". :vartype default_action: str or ~azure.mgmt.frontdoor.models.ActionType :ivar description: Describes the functionality of the managed rule. :vartype description: str @@ -1561,7 +2174,10 @@ class ManagedRuleDefinition(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ManagedRuleDefinition, self).__init__(**kwargs) self.rule_id = None self.default_state = None @@ -1569,24 +2185,22 @@ def __init__(self, **kwargs) -> None: self.description = None -class ManagedRuleExclusion(Model): +class ManagedRuleExclusion(msrest.serialization.Model): """Exclude variables from managed rule evaluation. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. The variable type to be excluded. - Possible values include: 'RequestHeaderNames', 'RequestCookieNames', - 'QueryStringArgNames', 'RequestBodyPostArgNames' - :type match_variable: str or - ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable - :param selector_match_operator: Required. Comparison operator to apply to - the selector when specifying which elements in the collection this - exclusion applies to. Possible values include: 'Equals', 'Contains', - 'StartsWith', 'EndsWith', 'EqualsAny' + :param match_variable: Required. The variable type to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "QueryStringArgNames", "RequestBodyPostArgNames", + "RequestBodyJsonArgNames". + :type match_variable: str or ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable + :param selector_match_operator: Required. Comparison operator to apply to the selector when + specifying which elements in the collection this exclusion applies to. Possible values include: + "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". :type selector_match_operator: str or ~azure.mgmt.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator - :param selector: Required. Selector value for which elements in the - collection this exclusion applies to. + :param selector: Required. Selector value for which elements in the collection this exclusion + applies to. :type selector: str """ @@ -1602,18 +2216,24 @@ class ManagedRuleExclusion(Model): 'selector': {'key': 'selector', 'type': 'str'}, } - def __init__(self, *, match_variable, selector_match_operator, selector: str, **kwargs) -> None: + def __init__( + self, + *, + match_variable: Union[str, "ManagedRuleExclusionMatchVariable"], + selector_match_operator: Union[str, "ManagedRuleExclusionSelectorMatchOperator"], + selector: str, + **kwargs + ): super(ManagedRuleExclusion, self).__init__(**kwargs) self.match_variable = match_variable self.selector_match_operator = selector_match_operator self.selector = selector -class ManagedRuleGroupDefinition(Model): +class ManagedRuleGroupDefinition(msrest.serialization.Model): """Describes a managed rule group. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar rule_group_name: Name of the managed rule group. :vartype rule_group_name: str @@ -1635,26 +2255,27 @@ class ManagedRuleGroupDefinition(Model): 'rules': {'key': 'rules', 'type': '[ManagedRuleDefinition]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ManagedRuleGroupDefinition, self).__init__(**kwargs) self.rule_group_name = None self.description = None self.rules = None -class ManagedRuleGroupOverride(Model): +class ManagedRuleGroupOverride(msrest.serialization.Model): """Defines a managed rule group override setting. All required parameters must be populated in order to send to Azure. - :param rule_group_name: Required. Describes the managed rule group to - override. + :param rule_group_name: Required. Describes the managed rule group to override. :type rule_group_name: str - :param exclusions: Describes the exclusions that are applied to all rules - in the group. + :param exclusions: Describes the exclusions that are applied to all rules in the group. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] - :param rules: List of rules that will be disabled. If none specified, all - rules in the group will be disabled. + :param rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. :type rules: list[~azure.mgmt.frontdoor.models.ManagedRuleOverride] """ @@ -1668,30 +2289,34 @@ class ManagedRuleGroupOverride(Model): 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, } - def __init__(self, *, rule_group_name: str, exclusions=None, rules=None, **kwargs) -> None: + def __init__( + self, + *, + rule_group_name: str, + exclusions: Optional[List["ManagedRuleExclusion"]] = None, + rules: Optional[List["ManagedRuleOverride"]] = None, + **kwargs + ): super(ManagedRuleGroupOverride, self).__init__(**kwargs) self.rule_group_name = rule_group_name self.exclusions = exclusions self.rules = rules -class ManagedRuleOverride(Model): +class ManagedRuleOverride(msrest.serialization.Model): """Defines a managed rule group override setting. All required parameters must be populated in order to send to Azure. :param rule_id: Required. Identifier for the managed rule. :type rule_id: str - :param enabled_state: Describes if the managed rule is in enabled or - disabled state. Defaults to Disabled if not specified. Possible values - include: 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState - :param action: Describes the override action to be applied when rule - matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :param enabled_state: Describes if the managed rule is in enabled or disabled state. Defaults + to Disabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :param action: Describes the override action to be applied when rule matches. Possible values + include: "Allow", "Block", "Log", "Redirect". :type action: str or ~azure.mgmt.frontdoor.models.ActionType - :param exclusions: Describes the exclusions that are applied to this - specific rule. + :param exclusions: Describes the exclusions that are applied to this specific rule. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] """ @@ -1706,7 +2331,15 @@ class ManagedRuleOverride(Model): 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, } - def __init__(self, *, rule_id: str, enabled_state=None, action=None, exclusions=None, **kwargs) -> None: + def __init__( + self, + *, + rule_id: str, + enabled_state: Optional[Union[str, "ManagedRuleEnabledState"]] = None, + action: Optional[Union[str, "ActionType"]] = None, + exclusions: Optional[List["ManagedRuleExclusion"]] = None, + **kwargs + ): super(ManagedRuleOverride, self).__init__(**kwargs) self.rule_id = rule_id self.enabled_state = enabled_state @@ -1714,23 +2347,22 @@ def __init__(self, *, rule_id: str, enabled_state=None, action=None, exclusions= self.exclusions = exclusions -class ManagedRuleSet(Model): +class ManagedRuleSet(msrest.serialization.Model): """Defines a managed rule set. All required parameters must be populated in order to send to Azure. :param rule_set_type: Required. Defines the rule set type to use. :type rule_set_type: str - :param rule_set_version: Required. Defines the version of the rule set to - use. + :param rule_set_version: Required. Defines the version of the rule set to use. :type rule_set_version: str - :param exclusions: Describes the exclusions that are applied to all rules - in the set. + :param rule_set_action: Defines the action to take when a managed rule set score threshold is + met. Possible values include: "Block", "Log", "Redirect". + :type rule_set_action: str or ~azure.mgmt.frontdoor.models.ManagedRuleSetActionType + :param exclusions: Describes the exclusions that are applied to all rules in the set. :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] - :param rule_group_overrides: Defines the rule group overrides to apply to - the rule set. - :type rule_group_overrides: - list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] + :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :type rule_group_overrides: list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] """ _validation = { @@ -1741,14 +2373,25 @@ class ManagedRuleSet(Model): _attribute_map = { 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_set_action': {'key': 'ruleSetAction', 'type': 'str'}, 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } - def __init__(self, *, rule_set_type: str, rule_set_version: str, exclusions=None, rule_group_overrides=None, **kwargs) -> None: + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + rule_set_action: Optional[Union[str, "ManagedRuleSetActionType"]] = None, + exclusions: Optional[List["ManagedRuleExclusion"]] = None, + rule_group_overrides: Optional[List["ManagedRuleGroupOverride"]] = None, + **kwargs + ): super(ManagedRuleSet, self).__init__(**kwargs) self.rule_set_type = rule_set_type self.rule_set_version = rule_set_version + self.rule_set_action = rule_set_action self.exclusions = exclusions self.rule_group_overrides = rule_group_overrides @@ -1756,8 +2399,7 @@ def __init__(self, *, rule_set_type: str, rule_set_version: str, exclusions=None class ManagedRuleSetDefinition(Resource): """Describes the a managed rule set definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1767,17 +2409,18 @@ class ManagedRuleSetDefinition(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :ivar provisioning_state: Provisioning state of the managed rule set. :vartype provisioning_state: str + :ivar rule_set_id: Id of the managed rule set. + :vartype rule_set_id: str :ivar rule_set_type: Type of the managed rule set. :vartype rule_set_type: str :ivar rule_set_version: Version of the managed rule set type. :vartype rule_set_version: str :ivar rule_groups: Rule groups of the managed rule set. - :vartype rule_groups: - list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] + :vartype rule_groups: list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] """ _validation = { @@ -1785,6 +2428,7 @@ class ManagedRuleSetDefinition(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'rule_set_id': {'readonly': True}, 'rule_set_type': {'readonly': True}, 'rule_set_version': {'readonly': True}, 'rule_groups': {'readonly': True}, @@ -1797,20 +2441,59 @@ class ManagedRuleSetDefinition(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_id': {'key': 'properties.ruleSetId', 'type': 'str'}, 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ManagedRuleGroupDefinition]'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(ManagedRuleSetDefinition, self).__init__(location=location, tags=tags, **kwargs) self.provisioning_state = None + self.rule_set_id = None self.rule_set_type = None self.rule_set_version = None self.rule_groups = None -class ManagedRuleSetList(Model): +class ManagedRuleSetDefinitionList(msrest.serialization.Model): + """List of managed rule set definitions available for use in a policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of managed rule set definitions. + :vartype value: list[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinition] + :param next_link: URL to retrieve next set of managed rule set definitions. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedRuleSetDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(ManagedRuleSetDefinitionList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class ManagedRuleSetList(msrest.serialization.Model): """Defines the list of managed rule sets for the policy. :param managed_rule_sets: List of rule sets. @@ -1821,31 +2504,33 @@ class ManagedRuleSetList(Model): 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, } - def __init__(self, *, managed_rule_sets=None, **kwargs) -> None: + def __init__( + self, + *, + managed_rule_sets: Optional[List["ManagedRuleSet"]] = None, + **kwargs + ): super(ManagedRuleSetList, self).__init__(**kwargs) self.managed_rule_sets = managed_rule_sets -class MatchCondition(Model): +class MatchCondition(msrest.serialization.Model): """Define a match condition. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. Request variable to compare with. - Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', - 'PostArgs', 'RequestUri', 'RequestHeader', 'RequestBody', 'Cookies', - 'SocketAddr' + :param match_variable: Required. Request variable to compare with. Possible values include: + "RemoteAddr", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", + "RequestBody", "Cookies", "SocketAddr". :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchVariable - :param selector: Match against a specific key from the QueryString, - PostArgs, RequestHeader or Cookies variables. Default is null. + :param selector: Match against a specific key from the QueryString, PostArgs, RequestHeader or + Cookies variables. Default is null. :type selector: str - :param operator: Required. Comparison type to use for matching with the - variable value. Possible values include: 'Any', 'IPMatch', 'GeoMatch', - 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', - 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' + :param operator: Required. Comparison type to use for matching with the variable value. + Possible values include: "Any", "IPMatch", "GeoMatch", "Equal", "Contains", "LessThan", + "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", "BeginsWith", "EndsWith", "RegEx". :type operator: str or ~azure.mgmt.frontdoor.models.Operator - :param negate_condition: Describes if the result of this condition should - be negated. + :param negate_condition: Describes if the result of this condition should be negated. :type negate_condition: bool :param match_value: Required. List of possible match values. :type match_value: list[str] @@ -1868,7 +2553,17 @@ class MatchCondition(Model): 'transforms': {'key': 'transforms', 'type': '[str]'}, } - def __init__(self, *, match_variable, operator, match_value, selector: str=None, negate_condition: bool=None, transforms=None, **kwargs) -> None: + def __init__( + self, + *, + match_variable: Union[str, "MatchVariable"], + operator: Union[str, "Operator"], + match_value: List[str], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[List[Union[str, "TransformType"]]] = None, + **kwargs + ): super(MatchCondition, self).__init__(**kwargs) self.match_variable = match_variable self.selector = selector @@ -1878,27 +2573,27 @@ def __init__(self, *, match_variable, operator, match_value, selector: str=None, self.transforms = transforms -class PolicySettings(Model): +class PolicySettings(msrest.serialization.Model): """Defines top-level WebApplicationFirewallPolicy configuration settings. - :param enabled_state: Describes if the policy is in enabled or disabled - state. Defaults to Enabled if not specified. Possible values include: - 'Disabled', 'Enabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.PolicyEnabledState - :param mode: Describes if it is in detection mode or prevention mode at - policy level. Possible values include: 'Prevention', 'Detection' + :param enabled_state: Describes if the policy is in enabled or disabled state. Defaults to + Enabled if not specified. Possible values include: "Disabled", "Enabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.PolicyEnabledState + :param mode: Describes if it is in detection mode or prevention mode at policy level. Possible + values include: "Prevention", "Detection". :type mode: str or ~azure.mgmt.frontdoor.models.PolicyMode - :param redirect_url: If action type is redirect, this field represents - redirect URL for the client. + :param redirect_url: If action type is redirect, this field represents redirect URL for the + client. :type redirect_url: str - :param custom_block_response_status_code: If the action type is block, - customer can override the response status code. + :param custom_block_response_status_code: If the action type is block, customer can override + the response status code. :type custom_block_response_status_code: int - :param custom_block_response_body: If the action type is block, customer - can override the response body. The body must be specified in base64 - encoding. + :param custom_block_response_body: If the action type is block, customer can override the + response body. The body must be specified in base64 encoding. :type custom_block_response_body: str + :param request_body_check: Describes if policy managed rules will inspect the request body + content. Possible values include: "Disabled", "Enabled". + :type request_body_check: str or ~azure.mgmt.frontdoor.models.PolicyRequestBodyCheck """ _validation = { @@ -1911,22 +2606,33 @@ class PolicySettings(Model): 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, 'custom_block_response_status_code': {'key': 'customBlockResponseStatusCode', 'type': 'int'}, 'custom_block_response_body': {'key': 'customBlockResponseBody', 'type': 'str'}, - } - - def __init__(self, *, enabled_state=None, mode=None, redirect_url: str=None, custom_block_response_status_code: int=None, custom_block_response_body: str=None, **kwargs) -> None: + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled_state: Optional[Union[str, "PolicyEnabledState"]] = None, + mode: Optional[Union[str, "PolicyMode"]] = None, + redirect_url: Optional[str] = None, + custom_block_response_status_code: Optional[int] = None, + custom_block_response_body: Optional[str] = None, + request_body_check: Optional[Union[str, "PolicyRequestBodyCheck"]] = None, + **kwargs + ): super(PolicySettings, self).__init__(**kwargs) self.enabled_state = enabled_state self.mode = mode self.redirect_url = redirect_url self.custom_block_response_status_code = custom_block_response_status_code self.custom_block_response_body = custom_block_response_body + self.request_body_check = request_body_check class PreconfiguredEndpoint(Resource): """Defines the properties of a preconfigured endpoint. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1936,16 +2642,16 @@ class PreconfiguredEndpoint(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: The description of the endpoint + :param description: The description of the endpoint. :type description: str - :param endpoint: The endpoint that is preconfigured + :param endpoint: The endpoint that is preconfigured. :type endpoint: str - :param endpoint_type: The type of endpoint. Possible values include: - 'AFD', 'AzureRegion', 'CDN', 'ATM' + :param endpoint_type: The type of endpoint. Possible values include: "AFD", "AzureRegion", + "CDN", "ATM". :type endpoint_type: str or ~azure.mgmt.frontdoor.models.EndpointType - :param backend: The preconfigured endpoint backend + :param backend: The preconfigured endpoint backend. :type backend: str """ @@ -1967,7 +2673,17 @@ class PreconfiguredEndpoint(Resource): 'backend': {'key': 'properties.backend', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, description: str=None, endpoint: str=None, endpoint_type=None, backend: str=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + endpoint: Optional[str] = None, + endpoint_type: Optional[Union[str, "EndpointType"]] = None, + backend: Optional[str] = None, + **kwargs + ): super(PreconfiguredEndpoint, self).__init__(location=location, tags=tags, **kwargs) self.description = description self.endpoint = endpoint @@ -1975,11 +2691,41 @@ def __init__(self, *, location: str=None, tags=None, description: str=None, endp self.backend = backend +class PreconfiguredEndpointList(msrest.serialization.Model): + """Defines a list of preconfigured endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of PreconfiguredEndpoints supported by NetworkExperiment. + :vartype value: list[~azure.mgmt.frontdoor.models.PreconfiguredEndpoint] + :param next_link: URL to get the next set of PreconfiguredEndpoints if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PreconfiguredEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(PreconfiguredEndpointList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + class Profile(Resource): """Defines an Network Experiment Profile and lists of Experiments. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -1989,24 +2735,23 @@ class Profile(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState - :param enabled_state: The state of the Experiment. Possible values - include: 'Enabled', 'Disabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param etag: Gets a unique read-only string that changes whenever the - resource is updated. + :param etag: Gets a unique read-only string that changes whenever the resource is updated. :type etag: str + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.NetworkExperimentResourceState + :param enabled_state: The state of the Experiment. Possible values include: "Enabled", + "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { @@ -2015,46 +2760,91 @@ class Profile(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, resource_state=None, enabled_state=None, etag: str=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + etag: Optional[str] = None, + enabled_state: Optional[Union[str, "State"]] = None, + **kwargs + ): super(Profile, self).__init__(location=location, tags=tags, **kwargs) - self.resource_state = resource_state - self.enabled_state = enabled_state self.etag = etag + self.resource_state = None + self.enabled_state = enabled_state + + +class ProfileList(msrest.serialization.Model): + """Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results. + Variables are only populated by the server, and will be ignored when sending a request. -class ProfileUpdateModel(Model): + :ivar value: List of Profiles within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.Profile] + :param next_link: URL to get the next set of Profile objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Profile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(ProfileList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class ProfileUpdateModel(msrest.serialization.Model): """Defines modifiable attributes of a Profile. - :param enabled_state: The enabled state of the Profile. Possible values - include: 'Enabled', 'Disabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param enabled_state: The enabled state of the Profile. Possible values include: "Enabled", + "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.State """ _attribute_map = { - 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, } - def __init__(self, *, enabled_state=None, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + enabled_state: Optional[Union[str, "State"]] = None, + **kwargs + ): super(ProfileUpdateModel, self).__init__(**kwargs) - self.enabled_state = enabled_state self.tags = tags + self.enabled_state = enabled_state -class PurgeParameters(Model): +class PurgeParameters(msrest.serialization.Model): """Parameters required for content purge. All required parameters must be populated in order to send to Azure. - :param content_paths: Required. The path to the content to be purged. Can - describe a file path or a wild card directory. + :param content_paths: Required. The path to the content to be purged. Can describe a file path + or a wild card directory. :type content_paths: list[str] """ @@ -2066,7 +2856,12 @@ class PurgeParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, *, content_paths, **kwargs) -> None: + def __init__( + self, + *, + content_paths: List[str], + **kwargs + ): super(PurgeParameters, self).__init__(**kwargs) self.content_paths = content_paths @@ -2076,43 +2871,37 @@ class RedirectConfiguration(RouteConfiguration): All required parameters must be populated in order to send to Azure. - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param redirect_type: The redirect type the rule will use when redirecting - traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', - 'PermanentRedirect' - :type redirect_type: str or - ~azure.mgmt.frontdoor.models.FrontDoorRedirectType - :param redirect_protocol: The protocol of the destination to where the - traffic is redirected. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type redirect_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol - :param custom_host: Host to redirect. Leave empty to use the incoming host - as the destination host. + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param redirect_type: The redirect type the rule will use when redirecting traffic. Possible + values include: "Moved", "Found", "TemporaryRedirect", "PermanentRedirect". + :type redirect_type: str or ~azure.mgmt.frontdoor.models.FrontDoorRedirectType + :param redirect_protocol: The protocol of the destination to where the traffic is redirected. + Possible values include: "HttpOnly", "HttpsOnly", "MatchRequest". + :type redirect_protocol: str or ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol + :param custom_host: Host to redirect. Leave empty to use the incoming host as the destination + host. :type custom_host: str - :param custom_path: The full path to redirect. Path cannot be empty and - must start with /. Leave empty to use the incoming path as destination - path. + :param custom_path: The full path to redirect. Path cannot be empty and must start with /. + Leave empty to use the incoming path as destination path. :type custom_path: str - :param custom_fragment: Fragment to add to the redirect URL. Fragment is - the part of the URL that comes after #. Do not include the #. + :param custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL + that comes after #. Do not include the #. :type custom_fragment: str - :param custom_query_string: The set of query strings to be placed in the - redirect URL. Setting this value would replace any existing query string; - leave empty to preserve the incoming query string. Query string must be in - = format. The first ? and & will be added automatically so do - not include them in the front, but do separate multiple query strings with - &. + :param custom_query_string: The set of query strings to be placed in the redirect URL. Setting + this value would replace any existing query string; leave empty to preserve the incoming query + string. Query string must be in :code:``=:code:`` format. The first ? and & will be + added automatically so do not include them in the front, but do separate multiple query strings + with &. :type custom_query_string: str """ _validation = { - 'odatatype': {'required': True}, + 'odata_type': {'required': True}, } _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, 'redirect_type': {'key': 'redirectType', 'type': 'str'}, 'redirect_protocol': {'key': 'redirectProtocol', 'type': 'str'}, 'custom_host': {'key': 'customHost', 'type': 'str'}, @@ -2121,89 +2910,136 @@ class RedirectConfiguration(RouteConfiguration): 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, } - def __init__(self, *, redirect_type=None, redirect_protocol=None, custom_host: str=None, custom_path: str=None, custom_fragment: str=None, custom_query_string: str=None, **kwargs) -> None: + def __init__( + self, + *, + redirect_type: Optional[Union[str, "FrontDoorRedirectType"]] = None, + redirect_protocol: Optional[Union[str, "FrontDoorRedirectProtocol"]] = None, + custom_host: Optional[str] = None, + custom_path: Optional[str] = None, + custom_fragment: Optional[str] = None, + custom_query_string: Optional[str] = None, + **kwargs + ): super(RedirectConfiguration, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' # type: str self.redirect_type = redirect_type self.redirect_protocol = redirect_protocol self.custom_host = custom_host self.custom_path = custom_path self.custom_fragment = custom_fragment self.custom_query_string = custom_query_string - self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' class RoutingRule(SubResource): - """A routing rule represents a specification for traffic to treat and where to - send it, along with health probe information. + """A routing rule represents a specification for traffic to treat and where to send it, along with health probe information. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str - :param frontend_endpoints: Frontend endpoints associated with this rule + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param frontend_endpoints: Frontend endpoints associated with this rule. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] - :param accepted_protocols: Protocol schemes to match for this rule - :type accepted_protocols: list[str or - ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param enabled_state: Whether to enable use of this rule. Permitted values - are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState :param route_configuration: A reference to the routing configuration. :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration - :param resource_state: Resource status. Possible values include: - 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' - :type resource_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorResourceState - :param name: Resource name. - :type name: str - :ivar type: Resource type. - :vartype type: str + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState """ _validation = { 'type': {'readonly': True}, + 'resource_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'properties.acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'properties.patternsToMatch', 'type': '[str]'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'route_configuration': {'key': 'properties.routeConfiguration', 'type': 'RouteConfiguration'}, + 'rules_engine': {'key': 'properties.rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'properties.webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, enabled_state=None, route_configuration=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_endpoints: Optional[List["SubResource"]] = None, + accepted_protocols: Optional[List[Union[str, "FrontDoorProtocol"]]] = None, + patterns_to_match: Optional[List[str]] = None, + enabled_state: Optional[Union[str, "RoutingRuleEnabledState"]] = None, + route_configuration: Optional["RouteConfiguration"] = None, + rules_engine: Optional["SubResource"] = None, + web_application_firewall_policy_link: Optional["RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): super(RoutingRule, self).__init__(id=id, **kwargs) + self.name = name + self.type = None self.frontend_endpoints = frontend_endpoints self.accepted_protocols = accepted_protocols self.patterns_to_match = patterns_to_match self.enabled_state = enabled_state self.route_configuration = route_configuration - self.resource_state = resource_state - self.name = name - self.type = None + self.rules_engine = rules_engine + self.web_application_firewall_policy_link = web_application_firewall_policy_link + self.resource_state = None + + +class RoutingRuleLink(msrest.serialization.Model): + """Defines the Resource ID for a Routing Rule. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(RoutingRuleLink, self).__init__(**kwargs) + self.id = id -class RoutingRuleListResult(Model): - """Result of the request to list Routing Rules. It contains a list of Routing - Rule objects and a URL link to get the next set of results. +class RoutingRuleListResult(msrest.serialization.Model): + """Result of the request to list Routing Rules. It contains a list of Routing Rule objects and a URL link to get the next set of results. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Routing Rules within a Front Door. :vartype value: list[~azure.mgmt.frontdoor.models.RoutingRule] - :param next_link: URL to get the next set of RoutingRule objects if there - are any. + :param next_link: URL to get the next set of RoutingRule objects if there are any. :type next_link: str """ @@ -2216,29 +3052,38 @@ class RoutingRuleListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, *, next_link: str=None, **kwargs) -> None: + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): super(RoutingRuleListResult, self).__init__(**kwargs) self.value = None self.next_link = next_link -class RoutingRuleUpdateParameters(Model): +class RoutingRuleUpdateParameters(msrest.serialization.Model): """Routing rules to apply to an endpoint. - :param frontend_endpoints: Frontend endpoints associated with this rule + :param frontend_endpoints: Frontend endpoints associated with this rule. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] - :param accepted_protocols: Protocol schemes to match for this rule - :type accepted_protocols: list[str or - ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param enabled_state: Whether to enable use of this rule. Permitted values - are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type enabled_state: str or - ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState :param route_configuration: A reference to the routing configuration. :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink """ _attribute_map = { @@ -2247,21 +3092,436 @@ class RoutingRuleUpdateParameters(Model): 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, - } - - def __init__(self, *, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, enabled_state=None, route_configuration=None, **kwargs) -> None: + 'rules_engine': {'key': 'rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, + } + + def __init__( + self, + *, + frontend_endpoints: Optional[List["SubResource"]] = None, + accepted_protocols: Optional[List[Union[str, "FrontDoorProtocol"]]] = None, + patterns_to_match: Optional[List[str]] = None, + enabled_state: Optional[Union[str, "RoutingRuleEnabledState"]] = None, + route_configuration: Optional["RouteConfiguration"] = None, + rules_engine: Optional["SubResource"] = None, + web_application_firewall_policy_link: Optional["RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): super(RoutingRuleUpdateParameters, self).__init__(**kwargs) self.frontend_endpoints = frontend_endpoints self.accepted_protocols = accepted_protocols self.patterns_to_match = patterns_to_match self.enabled_state = enabled_state self.route_configuration = route_configuration + self.rules_engine = rules_engine + self.web_application_firewall_policy_link = web_application_firewall_policy_link + + +class RoutingRuleProperties(RoutingRuleUpdateParameters): + """The JSON object that contains the properties required to create a routing rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param frontend_endpoints: Frontend endpoints associated with this rule. + :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.SubResource] + :param accepted_protocols: Protocol schemes to match for this rule. + :type accepted_protocols: list[str or ~azure.mgmt.frontdoor.models.FrontDoorProtocol] + :param patterns_to_match: The route patterns of the rule. + :type patterns_to_match: list[str] + :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Possible values include: "Enabled", "Disabled". + :type enabled_state: str or ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration + :param rules_engine: A reference to a specific Rules Engine Configuration to apply to this + route. + :type rules_engine: ~azure.mgmt.frontdoor.models.SubResource + :param web_application_firewall_policy_link: Defines the Web Application Firewall policy for + each routing rule (if applicable). + :type web_application_firewall_policy_link: + ~azure.mgmt.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[SubResource]'}, + 'accepted_protocols': {'key': 'acceptedProtocols', 'type': '[str]'}, + 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, + 'rules_engine': {'key': 'rulesEngine', 'type': 'SubResource'}, + 'web_application_firewall_policy_link': {'key': 'webApplicationFirewallPolicyLink', 'type': 'RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + + def __init__( + self, + *, + frontend_endpoints: Optional[List["SubResource"]] = None, + accepted_protocols: Optional[List[Union[str, "FrontDoorProtocol"]]] = None, + patterns_to_match: Optional[List[str]] = None, + enabled_state: Optional[Union[str, "RoutingRuleEnabledState"]] = None, + route_configuration: Optional["RouteConfiguration"] = None, + rules_engine: Optional["SubResource"] = None, + web_application_firewall_policy_link: Optional["RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink"] = None, + **kwargs + ): + super(RoutingRuleProperties, self).__init__(frontend_endpoints=frontend_endpoints, accepted_protocols=accepted_protocols, patterns_to_match=patterns_to_match, enabled_state=enabled_state, route_configuration=route_configuration, rules_engine=rules_engine, web_application_firewall_policy_link=web_application_firewall_policy_link, **kwargs) + self.resource_state = None + + +class RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink(msrest.serialization.Model): + """Defines the Web Application Firewall policy for each routing rule (if applicable). + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, self).__init__(**kwargs) + self.id = id + + +class RulesEngine(msrest.serialization.Model): + """A rules engine configuration containing a list of rules that will run to modify the runtime behavior of the request and response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar id: Resource ID. + :vartype id: str + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[RulesEngineRule]'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + } + + def __init__( + self, + *, + rules: Optional[List["RulesEngineRule"]] = None, + **kwargs + ): + super(RulesEngine, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.rules = rules + self.resource_state = None + + +class RulesEngineAction(msrest.serialization.Model): + """One or more actions that will execute, modifying the request and/or response. + + :param request_header_actions: A list of header actions to apply from the request from AFD to + the origin. + :type request_header_actions: list[~azure.mgmt.frontdoor.models.HeaderAction] + :param response_header_actions: A list of header actions to apply from the response from AFD to + the client. + :type response_header_actions: list[~azure.mgmt.frontdoor.models.HeaderAction] + :param route_configuration_override: Override the route configuration. + :type route_configuration_override: ~azure.mgmt.frontdoor.models.RouteConfiguration + """ + + _attribute_map = { + 'request_header_actions': {'key': 'requestHeaderActions', 'type': '[HeaderAction]'}, + 'response_header_actions': {'key': 'responseHeaderActions', 'type': '[HeaderAction]'}, + 'route_configuration_override': {'key': 'routeConfigurationOverride', 'type': 'RouteConfiguration'}, + } + + def __init__( + self, + *, + request_header_actions: Optional[List["HeaderAction"]] = None, + response_header_actions: Optional[List["HeaderAction"]] = None, + route_configuration_override: Optional["RouteConfiguration"] = None, + **kwargs + ): + super(RulesEngineAction, self).__init__(**kwargs) + self.request_header_actions = request_header_actions + self.response_header_actions = response_header_actions + self.route_configuration_override = route_configuration_override + + +class RulesEngineListResult(msrest.serialization.Model): + """Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of rulesEngines within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.RulesEngine] + :param next_link: URL to get the next set of RulesEngine objects if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RulesEngine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(RulesEngineListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class RulesEngineMatchCondition(msrest.serialization.Model): + """Define a match condition. + + All required parameters must be populated in order to send to Azure. + + :param rules_engine_match_variable: Required. Match Variable. Possible values include: + "IsMobile", "RemoteAddr", "RequestMethod", "QueryString", "PostArgs", "RequestUri", + "RequestPath", "RequestFilename", "RequestFilenameExtension", "RequestHeader", "RequestBody", + "RequestScheme". + :type rules_engine_match_variable: str or ~azure.mgmt.frontdoor.models.RulesEngineMatchVariable + :param selector: Name of selector in RequestHeader or RequestBody to be matched. + :type selector: str + :param rules_engine_operator: Required. Describes operator to apply to the match condition. + Possible values include: "Any", "IPMatch", "GeoMatch", "Equal", "Contains", "LessThan", + "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", "BeginsWith", "EndsWith". + :type rules_engine_operator: str or ~azure.mgmt.frontdoor.models.RulesEngineOperator + :param negate_condition: Describes if this is negate condition or not. + :type negate_condition: bool + :param rules_engine_match_value: Required. Match values to match against. The operator will + apply to each value in here with OR semantics. If any of them match the variable with the given + operator this match condition is considered a match. + :type rules_engine_match_value: list[str] + :param transforms: List of transforms. + :type transforms: list[str or ~azure.mgmt.frontdoor.models.Transform] + """ + + _validation = { + 'rules_engine_match_variable': {'required': True}, + 'rules_engine_operator': {'required': True}, + 'rules_engine_match_value': {'required': True}, + } + + _attribute_map = { + 'rules_engine_match_variable': {'key': 'rulesEngineMatchVariable', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'rules_engine_operator': {'key': 'rulesEngineOperator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'rules_engine_match_value': {'key': 'rulesEngineMatchValue', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + def __init__( + self, + *, + rules_engine_match_variable: Union[str, "RulesEngineMatchVariable"], + rules_engine_operator: Union[str, "RulesEngineOperator"], + rules_engine_match_value: List[str], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[List[Union[str, "Transform"]]] = None, + **kwargs + ): + super(RulesEngineMatchCondition, self).__init__(**kwargs) + self.rules_engine_match_variable = rules_engine_match_variable + self.selector = selector + self.rules_engine_operator = rules_engine_operator + self.negate_condition = negate_condition + self.rules_engine_match_value = rules_engine_match_value + self.transforms = transforms + + +class RulesEngineUpdateParameters(msrest.serialization.Model): + """Rules Engine Configuration to apply to a Routing Rule. + + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + """ + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[RulesEngineRule]'}, + } + + def __init__( + self, + *, + rules: Optional[List["RulesEngineRule"]] = None, + **kwargs + ): + super(RulesEngineUpdateParameters, self).__init__(**kwargs) + self.rules = rules + + +class RulesEngineProperties(RulesEngineUpdateParameters): + """The JSON object that contains the properties required to create a Rules Engine Configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param rules: A list of rules that define a particular Rules Engine Configuration. + :type rules: list[~azure.mgmt.frontdoor.models.RulesEngineRule] + :ivar resource_state: Resource status. Possible values include: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.FrontDoorResourceState + """ + + _validation = { + 'resource_state': {'readonly': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[RulesEngineRule]'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + } + def __init__( + self, + *, + rules: Optional[List["RulesEngineRule"]] = None, + **kwargs + ): + super(RulesEngineProperties, self).__init__(rules=rules, **kwargs) + self.resource_state = None + + +class RulesEngineRule(msrest.serialization.Model): + """Contains a list of match conditions, and an action on how to modify the request/response. If multiple rules match, the actions from one rule that conflict with a previous rule overwrite for a singular action, or append in the case of headers manipulation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A name to refer to this specific rule. + :type name: str + :param priority: Required. A priority assigned to this rule. + :type priority: int + :param action: Required. Actions to perform on the request and response if all of the match + conditions are met. + :type action: ~azure.mgmt.frontdoor.models.RulesEngineAction + :param match_conditions: A list of match conditions that must meet in order for the actions of + this rule to run. Having no match conditions means the actions will always run. + :type match_conditions: list[~azure.mgmt.frontdoor.models.RulesEngineMatchCondition] + :param match_processing_behavior: If this rule is a match should the rules engine continue + running the remaining rules or stop. If not present, defaults to Continue. Possible values + include: "Continue", "Stop". + :type match_processing_behavior: str or ~azure.mgmt.frontdoor.models.MatchProcessingBehavior + """ + + _validation = { + 'name': {'required': True}, + 'priority': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'RulesEngineAction'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[RulesEngineMatchCondition]'}, + 'match_processing_behavior': {'key': 'matchProcessingBehavior', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + priority: int, + action: "RulesEngineAction", + match_conditions: Optional[List["RulesEngineMatchCondition"]] = None, + match_processing_behavior: Optional[Union[str, "MatchProcessingBehavior"]] = None, + **kwargs + ): + super(RulesEngineRule, self).__init__(**kwargs) + self.name = name + self.priority = priority + self.action = action + self.match_conditions = match_conditions + self.match_processing_behavior = match_processing_behavior -class TagsObject(Model): + +class SecurityPolicyLink(msrest.serialization.Model): + """Defines the Resource ID for a Security Policy. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(SecurityPolicyLink, self).__init__(**kwargs) + self.id = id + + +class Sku(msrest.serialization.Model): + """The pricing tier of the web application firewall policy. + + :param name: Name of the pricing tier. Possible values include: "Classic_AzureFrontDoor", + "Standard_AzureFrontDoor", "Premium_AzureFrontDoor". + :type name: str or ~azure.mgmt.frontdoor.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "SkuName"]] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + + +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2269,7 +3529,12 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = tags @@ -2277,8 +3542,7 @@ def __init__(self, *, tags=None, **kwargs) -> None: class Timeseries(Resource): """Defines the Timeseries. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -2288,28 +3552,25 @@ class Timeseries(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param endpoint: The endpoint associated with the Timeseries data point + :param endpoint: The endpoint associated with the Timeseries data point. :type endpoint: str - :param start_date_time_utc: The start DateTime of the Timeseries in UTC + :param start_date_time_utc: The start DateTime of the Timeseries in UTC. :type start_date_time_utc: str - :param end_date_time_utc: The end DateTime of the Timeseries in UTC + :param end_date_time_utc: The end DateTime of the Timeseries in UTC. :type end_date_time_utc: str - :param aggregation_interval: The aggregation interval of the Timeseries. - Possible values include: 'Hourly', 'Daily' - :type aggregation_interval: str or - ~azure.mgmt.frontdoor.models.AggregationInterval - :param timeseries_type: The type of Timeseries. Possible values include: - 'MeasurementCounts', 'LatencyP50', 'LatencyP75', 'LatencyP95' + :param aggregation_interval: The aggregation interval of the Timeseries. Possible values + include: "Hourly", "Daily". + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.AggregationInterval + :param timeseries_type: The type of Timeseries. Possible values include: "MeasurementCounts", + "LatencyP50", "LatencyP75", "LatencyP95". :type timeseries_type: str or ~azure.mgmt.frontdoor.models.TimeseriesType - :param country: The country associated with the Timeseries. Values are - country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :param country: The country associated with the Timeseries. Values are country ISO codes as + specified here- https://www.iso.org/iso-3166-country-codes.html. :type country: str - :param timeseries_data: The set of data points for the timeseries - :type timeseries_data: - list[~azure.mgmt.frontdoor.models.TimeseriesDataPoint] + :param timeseries_data: The set of data points for the timeseries. + :type timeseries_data: list[~azure.mgmt.frontdoor.models.TimeseriesDataPoint] """ _validation = { @@ -2333,7 +3594,20 @@ class Timeseries(Resource): 'timeseries_data': {'key': 'properties.timeseriesData', 'type': '[TimeseriesDataPoint]'}, } - def __init__(self, *, location: str=None, tags=None, endpoint: str=None, start_date_time_utc: str=None, end_date_time_utc: str=None, aggregation_interval=None, timeseries_type=None, country: str=None, timeseries_data=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + endpoint: Optional[str] = None, + start_date_time_utc: Optional[str] = None, + end_date_time_utc: Optional[str] = None, + aggregation_interval: Optional[Union[str, "AggregationInterval"]] = None, + timeseries_type: Optional[Union[str, "TimeseriesType"]] = None, + country: Optional[str] = None, + timeseries_data: Optional[List["TimeseriesDataPoint"]] = None, + **kwargs + ): super(Timeseries, self).__init__(location=location, tags=tags, **kwargs) self.endpoint = endpoint self.start_date_time_utc = start_date_time_utc @@ -2344,12 +3618,12 @@ def __init__(self, *, location: str=None, tags=None, endpoint: str=None, start_d self.timeseries_data = timeseries_data -class TimeseriesDataPoint(Model): +class TimeseriesDataPoint(msrest.serialization.Model): """Defines a timeseries datapoint used in a timeseries. - :param date_time_utc: The DateTime of the Timeseries data point in UTC + :param date_time_utc: The DateTime of the Timeseries data point in UTC. :type date_time_utc: str - :param value: The Value of the Timeseries data point + :param value: The Value of the Timeseries data point. :type value: float """ @@ -2358,19 +3632,24 @@ class TimeseriesDataPoint(Model): 'value': {'key': 'value', 'type': 'float'}, } - def __init__(self, *, date_time_utc: str=None, value: float=None, **kwargs) -> None: + def __init__( + self, + *, + date_time_utc: Optional[str] = None, + value: Optional[float] = None, + **kwargs + ): super(TimeseriesDataPoint, self).__init__(**kwargs) self.date_time_utc = date_time_utc self.value = value -class ValidateCustomDomainInput(Model): +class ValidateCustomDomainInput(msrest.serialization.Model): """Input of the custom domain to be validated for DNS mapping. All required parameters must be populated in order to send to Azure. - :param host_name: Required. The host name of the custom domain. Must be a - domain name. + :param host_name: Required. The host name of the custom domain. Must be a domain name. :type host_name: str """ @@ -2382,24 +3661,26 @@ class ValidateCustomDomainInput(Model): 'host_name': {'key': 'hostName', 'type': 'str'}, } - def __init__(self, *, host_name: str, **kwargs) -> None: + def __init__( + self, + *, + host_name: str, + **kwargs + ): super(ValidateCustomDomainInput, self).__init__(**kwargs) self.host_name = host_name -class ValidateCustomDomainOutput(Model): +class ValidateCustomDomainOutput(msrest.serialization.Model): """Output of custom domain validation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar custom_domain_validated: Indicates whether the custom domain is - valid or not. + :ivar custom_domain_validated: Indicates whether the custom domain is valid or not. :vartype custom_domain_validated: bool :ivar reason: The reason why the custom domain is not valid. :vartype reason: str - :ivar message: Error message describing why the custom domain is not - valid. + :ivar message: Error message describing why the custom domain is not valid. :vartype message: str """ @@ -2415,7 +3696,10 @@ class ValidateCustomDomainOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(ValidateCustomDomainOutput, self).__init__(**kwargs) self.custom_domain_validated = None self.reason = None @@ -2425,8 +3709,7 @@ def __init__(self, **kwargs) -> None: class WebApplicationFirewallPolicy(Resource): """Defines web application firewall policy. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str @@ -2436,28 +3719,33 @@ class WebApplicationFirewallPolicy(Resource): :vartype type: str :param location: Resource location. :type location: str - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param etag: Gets a unique read-only string that changes whenever the resource is updated. + :type etag: str + :param sku: The pricing tier of web application firewall policy. Defaults to + Classic_AzureFrontDoor if not specified. + :type sku: ~azure.mgmt.frontdoor.models.Sku :param policy_settings: Describes settings for the policy. :type policy_settings: ~azure.mgmt.frontdoor.models.PolicySettings :param custom_rules: Describes custom rules inside the policy. :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRuleList :param managed_rules: Describes managed rules inside the policy. :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSetList - :ivar frontend_endpoint_links: Describes Frontend Endpoints associated - with this Web Application Firewall policy. - :vartype frontend_endpoint_links: - list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar frontend_endpoint_links: Describes Frontend Endpoints associated with this Web + Application Firewall policy. + :vartype frontend_endpoint_links: list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar routing_rule_links: Describes Routing Rules associated with this Web Application Firewall + policy. + :vartype routing_rule_links: list[~azure.mgmt.frontdoor.models.RoutingRuleLink] + :ivar security_policy_links: Describes Security Policy associated with this Web Application + Firewall policy. + :vartype security_policy_links: list[~azure.mgmt.frontdoor.models.SecurityPolicyLink] :ivar provisioning_state: Provisioning state of the policy. :vartype provisioning_state: str - :ivar resource_state: Resource status of the policy. Possible values - include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', - 'Deleting' - :vartype resource_state: str or - ~azure.mgmt.frontdoor.models.PolicyResourceState - :param etag: Gets a unique read-only string that changes whenever the - resource is updated. - :type etag: str + :ivar resource_state: Resource status of the policy. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or ~azure.mgmt.frontdoor.models.PolicyResourceState """ _validation = { @@ -2465,6 +3753,8 @@ class WebApplicationFirewallPolicy(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'frontend_endpoint_links': {'readonly': True}, + 'routing_rule_links': {'readonly': True}, + 'security_policy_links': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, } @@ -2475,21 +3765,70 @@ class WebApplicationFirewallPolicy(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRuleList'}, 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSetList'}, 'frontend_endpoint_links': {'key': 'properties.frontendEndpointLinks', 'type': '[FrontendEndpointLink]'}, + 'routing_rule_links': {'key': 'properties.routingRuleLinks', 'type': '[RoutingRuleLink]'}, + 'security_policy_links': {'key': 'properties.securityPolicyLinks', 'type': '[SecurityPolicyLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, policy_settings=None, custom_rules=None, managed_rules=None, etag: str=None, **kwargs) -> None: + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + etag: Optional[str] = None, + sku: Optional["Sku"] = None, + policy_settings: Optional["PolicySettings"] = None, + custom_rules: Optional["CustomRuleList"] = None, + managed_rules: Optional["ManagedRuleSetList"] = None, + **kwargs + ): super(WebApplicationFirewallPolicy, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.sku = sku self.policy_settings = policy_settings self.custom_rules = custom_rules self.managed_rules = managed_rules self.frontend_endpoint_links = None + self.routing_rule_links = None + self.security_policy_links = None self.provisioning_state = None self.resource_state = None - self.etag = etag + + +class WebApplicationFirewallPolicyList(msrest.serialization.Model): + """Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of WebApplicationFirewallPolicies within a resource group. + :vartype value: list[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] + :param next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are + any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(WebApplicationFirewallPolicyList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/__init__.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/__init__.py index 8e04fc804f8..e7a8086b356 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/__init__.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/__init__.py @@ -1,34 +1,35 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._network_experiment_profiles_operations import NetworkExperimentProfilesOperations from ._preconfigured_endpoints_operations import PreconfiguredEndpointsOperations from ._experiments_operations import ExperimentsOperations from ._reports_operations import ReportsOperations +from ._front_door_name_availability_operations import FrontDoorNameAvailabilityOperations +from ._front_door_name_availability_with_subscription_operations import FrontDoorNameAvailabilityWithSubscriptionOperations from ._front_doors_operations import FrontDoorsOperations from ._frontend_endpoints_operations import FrontendEndpointsOperations from ._endpoints_operations import EndpointsOperations +from ._rules_engines_operations import RulesEnginesOperations from ._policies_operations import PoliciesOperations from ._managed_rule_sets_operations import ManagedRuleSetsOperations -from ._front_door_management_client_operations import FrontDoorManagementClientOperationsMixin __all__ = [ 'NetworkExperimentProfilesOperations', 'PreconfiguredEndpointsOperations', 'ExperimentsOperations', 'ReportsOperations', + 'FrontDoorNameAvailabilityOperations', + 'FrontDoorNameAvailabilityWithSubscriptionOperations', 'FrontDoorsOperations', 'FrontendEndpointsOperations', 'EndpointsOperations', + 'RulesEnginesOperations', 'PoliciesOperations', 'ManagedRuleSetsOperations', - 'FrontDoorManagementClientOperationsMixin', ] diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_endpoints_operations.py index 54445455a68..6c9c81ef1f2 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_endpoints_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_endpoints_operations.py @@ -1,131 +1,170 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class EndpointsOperations(object): """EndpointsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config - + self._config = config def _purge_content_initial( - self, resource_group_name, front_door_name, content_paths, custom_headers=None, raw=False, **operation_config): - content_file_paths = models.PurgeParameters(content_paths=content_paths) + self, + resource_group_name, # type: str + front_door_name, # type: str + content_file_paths, # type: "_models.PurgeParameters" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.purge_content.metadata['url'] + url = self._purge_content_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(content_file_paths, 'PurgeParameters') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(content_file_paths, 'PurgeParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def purge_content( - self, resource_group_name, front_door_name, content_paths, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_content_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge'} # type: ignore + + def begin_purge_content( + self, + resource_group_name, # type: str + front_door_name, # type: str + content_file_paths, # type: "_models.PurgeParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Removes a content from Front Door. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param content_paths: The path to the content to be purged. Can - describe a file path or a wild card directory. - :type content_paths: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. + :type content_file_paths: ~azure.mgmt.frontdoor.models.PurgeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._purge_content_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - content_paths=content_paths, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._purge_content_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + content_file_paths=content_file_paths, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - purge_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_experiments_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_experiments_operations.py index 5a6ac2b63da..1c53b3924b0 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_experiments_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_experiments_operations.py @@ -1,485 +1,595 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ExperimentsOperations(object): """ExperimentsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-11-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" - - self.config = config + self._config = config def list_by_profile( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExperimentList"] """Gets a list of Experiments. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets a list of Experiments. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Experiment - :rtype: - ~azure.mgmt.frontdoor.models.ExperimentPaged[~azure.mgmt.frontdoor.models.Experiment] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.ExperimentList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_profile.metadata['url'] + url = self.list_by_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ExperimentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments'} + return ItemPaged( + get_next, extract_data + ) + list_by_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments'} # type: ignore def get( - self, resource_group_name, profile_name, experiment_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Experiment" """Gets an Experiment by ExperimentName. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets an Experiment by ExperimentName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Experiment or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.Experiment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Experiment, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Experiment + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, profile_name, experiment_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + parameters, # type: "_models.Experiment" + **kwargs # type: Any + ): + # type: (...) -> "_models.Experiment" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Experiment') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Experiment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, profile_name, experiment_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + parameters, # type: "_models.Experiment" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Experiment"] """Creates or updates an Experiment. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Creates or updates an Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param parameters: The Experiment resource + :param parameters: The Experiment resource. :type parameters: ~azure.mgmt.frontdoor.models.Experiment - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Experiment or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.Experiment] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.Experiment]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - experiment_name=experiment_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('Experiment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore def _update_initial( - self, resource_group_name, profile_name, experiment_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + parameters, # type: "_models.ExperimentUpdateModel" + **kwargs # type: Any + ): + # type: (...) -> "_models.Experiment" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.update.metadata['url'] + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ExperimentUpdateModel') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ExperimentUpdateModel') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('Experiment', response) + deserialized = self._deserialize('Experiment', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update( - self, resource_group_name, profile_name, experiment_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + parameters, # type: "_models.ExperimentUpdateModel" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Experiment"] """Updates an Experiment by Experiment id. Updates an Experiment. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param parameters: The Experiment Update Model + :param parameters: The Experiment Update Model. :type parameters: ~azure.mgmt.frontdoor.models.ExperimentUpdateModel - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Experiment or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.Experiment] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.Experiment]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - experiment_name=experiment_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('Experiment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore def _delete_initial( - self, resource_group_name, profile_name, experiment_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, profile_name, experiment_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an Experiment. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Deletes an Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - experiment_name=experiment_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + experiment_name=experiment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_operations.py new file mode 100644 index 00000000000..658a9606429 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FrontDoorNameAvailabilityOperations(object): + """FrontDoorNameAvailabilityOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check( + self, + check_front_door_name_availability_input, # type: "_models.CheckNameAvailabilityInput" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityOutput" + """Check the availability of a Front Door resource name. + + :param check_front_door_name_availability_input: Input to check. + :type check_front_door_name_availability_input: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(check_front_door_name_availability_input, 'CheckNameAvailabilityInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check.metadata = {'url': '/providers/Microsoft.Network/checkFrontDoorNameAvailability'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_with_subscription_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_with_subscription_operations.py new file mode 100644 index 00000000000..6d8417932a5 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_door_name_availability_with_subscription_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FrontDoorNameAvailabilityWithSubscriptionOperations(object): + """FrontDoorNameAvailabilityWithSubscriptionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check( + self, + check_front_door_name_availability_input, # type: "_models.CheckNameAvailabilityInput" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityOutput" + """Check the availability of a Front Door subdomain. + + :param check_front_door_name_availability_input: Input to check. + :type check_front_door_name_availability_input: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.CheckNameAvailabilityOutput + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(check_front_door_name_availability_input, 'CheckNameAvailabilityInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_doors_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_doors_operations.py index c8023dfe480..a83d3b3d52d 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_doors_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_front_doors_operations.py @@ -1,498 +1,564 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class FrontDoorsOperations(object): """FrontDoorsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FrontDoorListResult"] """Lists all of the Front Doors within an Azure subscription. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FrontDoor - :rtype: - ~azure.mgmt.frontdoor.models.FrontDoorPaged[~azure.mgmt.frontdoor.models.FrontDoor] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontDoorListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.FrontDoorListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('FrontDoorListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FrontDoorPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the Front Doors within a resource group under a - subscription. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FrontDoorListResult"] + """Lists all of the Front Doors within a resource group under a subscription. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FrontDoor - :rtype: - ~azure.mgmt.frontdoor.models.FrontDoorPaged[~azure.mgmt.frontdoor.models.FrontDoor] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontDoorListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.FrontDoorListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('FrontDoorListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FrontDoorPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors'} # type: ignore def get( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): - """Gets a Front Door with the specified Front Door name under the - specified subscription and resource group. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + self, + resource_group_name, # type: str + front_door_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FrontDoor" + """Gets a Front Door with the specified Front Door name under the specified subscription and + resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FrontDoor or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.FrontDoor or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontDoor, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.FrontDoor + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FrontDoor', response) + deserialized = self._deserialize('FrontDoor', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, front_door_name, front_door_parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + front_door_name, # type: str + front_door_parameters, # type: "_models.FrontDoor" + **kwargs # type: Any + ): + # type: (...) -> "_models.FrontDoor" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(front_door_parameters, 'FrontDoor') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(front_door_parameters, 'FrontDoor') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('FrontDoor', response) + deserialized = self._deserialize('FrontDoor', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('FrontDoor', response) + deserialized = self._deserialize('FrontDoor', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('FrontDoor', response) + deserialized = self._deserialize('FrontDoor', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, front_door_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new Front Door with a Front Door name under the specified - subscription and resource group. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + front_door_name, # type: str + front_door_parameters, # type: "_models.FrontDoor" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.FrontDoor"] + """Creates a new Front Door with a Front Door name under the specified subscription and resource + group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param front_door_parameters: Front Door properties needed to create a - new Front Door. + :param front_door_parameters: Front Door properties needed to create a new Front Door. :type front_door_parameters: ~azure.mgmt.frontdoor.models.FrontDoor - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns FrontDoor or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.FrontDoor] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.FrontDoor]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either FrontDoor or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.FrontDoor] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - front_door_parameters=front_door_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontDoor"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('FrontDoor', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + front_door_parameters=front_door_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FrontDoor', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore def _delete_initial( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + front_door_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + front_door_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an existing Front Door with the specified parameters. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}'} # type: ignore def validate_custom_domain( - self, resource_group_name, front_door_name, host_name, custom_headers=None, raw=False, **operation_config): - """Validates the custom domain mapping to ensure it maps to the correct - Front Door endpoint in DNS. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + self, + resource_group_name, # type: str + front_door_name, # type: str + custom_domain_properties, # type: "_models.ValidateCustomDomainInput" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidateCustomDomainOutput" + """Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in + DNS. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param host_name: The host name of the custom domain. Must be a domain - name. - :type host_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateCustomDomainOutput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.ValidateCustomDomainOutput or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :param custom_domain_properties: Custom domain to be validated. + :type custom_domain_properties: ~azure.mgmt.frontdoor.models.ValidateCustomDomainInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateCustomDomainOutput, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.ValidateCustomDomainOutput + :raises: ~azure.core.exceptions.HttpResponseError """ - custom_domain_properties = models.ValidateCustomDomainInput(host_name=host_name) + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateCustomDomainOutput"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.validate_custom_domain.metadata['url'] + url = self.validate_custom_domain.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(custom_domain_properties, 'ValidateCustomDomainInput') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(custom_domain_properties, 'ValidateCustomDomainInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ValidateCustomDomainOutput', response) + deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - validate_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain'} + validate_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_frontend_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_frontend_endpoints_operations.py index 73b8469f51e..367d61b90c6 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_frontend_endpoints_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_frontend_endpoints_operations.py @@ -1,360 +1,437 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class FrontendEndpointsOperations(object): """FrontendEndpointsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config + self._config = config def list_by_front_door( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + front_door_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FrontendEndpointsListResult"] """Lists all of the frontend endpoints within a Front Door. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FrontendEndpoint - :rtype: - ~azure.mgmt.frontdoor.models.FrontendEndpointPaged[~azure.mgmt.frontdoor.models.FrontendEndpoint] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FrontendEndpointsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.FrontendEndpointsListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendEndpointsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_front_door.metadata['url'] + url = self.list_by_front_door.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('FrontendEndpointsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FrontendEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints'} + return ItemPaged( + get_next, extract_data + ) + list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints'} # type: ignore def get( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_headers=None, raw=False, **operation_config): - """Gets a Frontend endpoint with the specified name within the specified - Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + self, + resource_group_name, # type: str + front_door_name, # type: str + frontend_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FrontendEndpoint" + """Gets a Frontend endpoint with the specified name within the specified Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param frontend_endpoint_name: Name of the Frontend endpoint which is - unique within the Front Door. + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. :type frontend_endpoint_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FrontendEndpoint or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.FrontendEndpoint or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontendEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.FrontendEndpoint + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FrontendEndpoint', response) + deserialized = self._deserialize('FrontendEndpoint', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} # type: ignore def _enable_https_initial( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_https_configuration, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + front_door_name, # type: str + frontend_endpoint_name, # type: str + custom_https_configuration, # type: "_models.CustomHttpsConfiguration" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.enable_https.metadata['url'] + url = self._enable_https_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(custom_https_configuration, 'CustomHttpsConfiguration') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(custom_https_configuration, 'CustomHttpsConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_https( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_https_configuration, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _enable_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps'} # type: ignore + + def begin_enable_https( + self, + resource_group_name, # type: str + front_door_name, # type: str + frontend_endpoint_name, # type: str + custom_https_configuration, # type: "_models.CustomHttpsConfiguration" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Enables a frontendEndpoint for HTTPS traffic. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param frontend_endpoint_name: Name of the Frontend endpoint which is - unique within the Front Door. + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. :type frontend_endpoint_name: str - :param custom_https_configuration: The configuration specifying how to - enable HTTPS - :type custom_https_configuration: - ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :param custom_https_configuration: The configuration specifying how to enable HTTPS. + :type custom_https_configuration: ~azure.mgmt.frontdoor.models.CustomHttpsConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._enable_https_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - frontend_endpoint_name=frontend_endpoint_name, - custom_https_configuration=custom_https_configuration, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._enable_https_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + frontend_endpoint_name=frontend_endpoint_name, + custom_https_configuration=custom_https_configuration, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - enable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_enable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps'} # type: ignore def _disable_https_initial( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + front_door_name, # type: str + frontend_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + # Construct URL - url = self.disable_https.metadata['url'] + url = self._disable_https_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def disable_https( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disable_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps'} # type: ignore + + def begin_disable_https( + self, + resource_group_name, # type: str + front_door_name, # type: str + frontend_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Disables a frontendEndpoint for HTTPS traffic. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. + :param front_door_name: Name of the Front Door which is globally unique. :type front_door_name: str - :param frontend_endpoint_name: Name of the Frontend endpoint which is - unique within the Front Door. + :param frontend_endpoint_name: Name of the Frontend endpoint which is unique within the Front + Door. :type frontend_endpoint_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._disable_https_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - frontend_endpoint_name=frontend_endpoint_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._disable_https_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + frontend_endpoint_name=frontend_endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - disable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disable_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_managed_rule_sets_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_managed_rule_sets_operations.py index cf28d3b7241..fe870cfb392 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_managed_rule_sets_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_managed_rule_sets_operations.py @@ -1,104 +1,114 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ManagedRuleSetsOperations(object): """ManagedRuleSetsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-10-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedRuleSetDefinitionList"] """Lists all available managed rule sets. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedRuleSetDefinition - :rtype: - ~azure.mgmt.frontdoor.models.ManagedRuleSetDefinitionPaged[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinition] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedRuleSetDefinitionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinitionList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedRuleSetDefinitionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedRuleSetDefinitionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedRuleSetDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_network_experiment_profiles_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_network_experiment_profiles_operations.py index f327e312a32..2fc4c792de3 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_network_experiment_profiles_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_network_experiment_profiles_operations.py @@ -1,534 +1,636 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class NetworkExperimentProfilesOperations(object): """NetworkExperimentProfilesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-11-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProfileList"] """Gets a list of Network Experiment Profiles under a subscription. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Profile - :rtype: - ~azure.mgmt.frontdoor.models.ProfilePaged[~azure.mgmt.frontdoor.models.Profile] - :raises: - :class:`ErrorResponseException` + Gets a list of Network Experiment Profiles under a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProfileList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.ProfileList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProfileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ProfileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProfilePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Network Experiment Profiles within a resource group - under a subscription. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProfileList"] + """Gets a list of Network Experiment Profiles within a resource group under a subscription. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets a list of Network Experiment Profiles within a resource group under a subscription. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Profile - :rtype: - ~azure.mgmt.frontdoor.models.ProfilePaged[~azure.mgmt.frontdoor.models.Profile] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProfileList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.ProfileList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProfileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ProfileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ProfilePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles'} # type: ignore def get( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Profile" """Gets an NetworkExperiment Profile by ProfileName. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets an NetworkExperiment Profile by ProfileName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Profile or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.Profile or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Profile, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Profile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore def _create_or_update_initial( - self, profile_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + profile_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.Profile" + **kwargs # type: Any + ): + # type: (...) -> "_models.Profile" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Profile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Profile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, profile_name, resource_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + def begin_create_or_update( + self, + profile_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.Profile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Profile"] """Creates an NetworkExperiment Profile. - :param profile_name: The Profile identifier associated with the Tenant - and Partner + Creates an NetworkExperiment Profile. + + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param parameters: An Network Experiment Profile + :param parameters: An Network Experiment Profile. :type parameters: ~azure.mgmt.frontdoor.models.Profile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Profile or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.Profile] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.Profile]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Profile or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - profile_name=profile_name, - resource_group_name=resource_group_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('Profile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + profile_name=profile_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore def _update_initial( - self, resource_group_name, profile_name, enabled_state=None, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ProfileUpdateModel(enabled_state=enabled_state, tags=tags) + self, + resource_group_name, # type: str + profile_name, # type: str + parameters, # type: "_models.ProfileUpdateModel" + **kwargs # type: Any + ): + # type: (...) -> "_models.Profile" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProfileUpdateModel') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProfileUpdateModel') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('Profile', response) + deserialized = self._deserialize('Profile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update( - self, resource_group_name, profile_name, enabled_state=None, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + profile_name, # type: str + parameters, # type: "_models.ProfileUpdateModel" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Profile"] """Updates an NetworkExperimentProfiles by NetworkExperimentProfile name. Updates an NetworkExperimentProfiles. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param enabled_state: The enabled state of the Profile. Possible - values include: 'Enabled', 'Disabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.State - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :param parameters: The Profile Update Model. + :type parameters: ~azure.mgmt.frontdoor.models.ProfileUpdateModel + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Profile or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.Profile] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.Profile]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Profile or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - enabled_state=enabled_state, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('Profile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Profile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore def _delete_initial( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, profile_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an NetworkExperiment Profile by ProfileName. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Deletes an NetworkExperiment Profile by ProfileName. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_policies_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_policies_operations.py index d709da5a562..1491aa3dd09 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_policies_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_policies_operations.py @@ -1,359 +1,422 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PoliciesOperations(object): """PoliciesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-10-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config + self._config = config def list( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebApplicationFirewallPolicyList"] """Lists all of the protection policies within a resource group. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebApplicationFirewallPolicy - :rtype: - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicyPaged[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicyList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WebApplicationFirewallPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies'} # type: ignore def get( - self, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebApplicationFirewallPolicy" """Retrieve protection policy with specified name within a resource group. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str :param policy_name: The name of the Web Application Firewall Policy. :type policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebApplicationFirewallPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WebApplicationFirewallPolicy', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + policy_name, # type: str + parameters, # type: "_models.WebApplicationFirewallPolicy" + **kwargs # type: Any + ): + # type: (...) -> "_models.WebApplicationFirewallPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('WebApplicationFirewallPolicy', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('WebApplicationFirewallPolicy', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('WebApplicationFirewallPolicy', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update policy with specified rule set name within a resource - group. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + policy_name, # type: str + parameters, # type: "_models.WebApplicationFirewallPolicy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.WebApplicationFirewallPolicy"] + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str :param policy_name: The name of the Web Application Firewall Policy. :type policy_name: str :param parameters: Policy to be created. - :type parameters: - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :type parameters: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns - WebApplicationFirewallPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy]] - :raises: - :class:`ErrorResponseException` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either WebApplicationFirewallPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('WebApplicationFirewallPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore def _delete_initial( - self, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore - def delete( - self, resource_group_name, policy_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_delete( + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes Policy. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str :param policy_name: The name of the Web Application Firewall Policy. :type policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_preconfigured_endpoints_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_preconfigured_endpoints_operations.py index 39cfa7b380e..041c2326a18 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_preconfigured_endpoints_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_preconfigured_endpoints_operations.py @@ -1,112 +1,124 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PreconfiguredEndpointsOperations(object): """PreconfiguredEndpointsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-11-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" - - self.config = config + self._config = config def list( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PreconfiguredEndpointList"] """Gets a list of Preconfigured Endpoints. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets a list of Preconfigured Endpoints. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PreconfiguredEndpoint - :rtype: - ~azure.mgmt.frontdoor.models.PreconfiguredEndpointPaged[~azure.mgmt.frontdoor.models.PreconfiguredEndpoint] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PreconfiguredEndpointList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.PreconfiguredEndpointList] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PreconfiguredEndpointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('PreconfiguredEndpointList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PreconfiguredEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/PreconfiguredEndpoints'} + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/PreconfiguredEndpoints'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_reports_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_reports_operations.py index 70c135c51d4..ac9090bb137 100644 --- a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_reports_operations.py +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_reports_operations.py @@ -1,91 +1,104 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import datetime +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ReportsOperations(object): """ReportsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-11-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" - - self.config = config + self._config = config def get_latency_scorecards( - self, resource_group_name, profile_name, experiment_name, aggregation_interval, end_date_time_utc=None, country=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + aggregation_interval, # type: Union[str, "_models.LatencyScorecardAggregationInterval"] + end_date_time_utc=None, # type: Optional[str] + country=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.LatencyScorecard" """Gets a Latency Scorecard for a given Experiment. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets a Latency Scorecard for a given Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param aggregation_interval: The aggregation interval of the Latency - Scorecard. Possible values include: 'Daily', 'Weekly', 'Monthly' - :type aggregation_interval: str or - ~azure.mgmt.frontdoor.models.LatencyScorecardAggregationInterval - :param end_date_time_utc: The end DateTime of the Latency Scorecard in - UTC + :param aggregation_interval: The aggregation interval of the Latency Scorecard. + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.LatencyScorecardAggregationInterval + :param end_date_time_utc: The end DateTime of the Latency Scorecard in UTC. :type end_date_time_utc: str - :param country: The country associated with the Latency Scorecard. - Values are country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :param country: The country associated with the Latency Scorecard. Values are country ISO codes + as specified here- https://www.iso.org/iso-3166-country-codes.html. :type country: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LatencyScorecard or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.LatencyScorecard or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LatencyScorecard, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.LatencyScorecard + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LatencyScorecard"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.get_latency_scorecards.metadata['url'] + url = self.get_latency_scorecards.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if end_date_time_utc is not None: query_parameters['endDateTimeUTC'] = self._serialize.query("end_date_time_utc", end_date_time_utc, 'str') if country is not None: @@ -93,89 +106,89 @@ def get_latency_scorecards( query_parameters['aggregationInterval'] = self._serialize.query("aggregation_interval", aggregation_interval, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('LatencyScorecard', response) + deserialized = self._deserialize('LatencyScorecard', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_latency_scorecards.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/LatencyScorecard'} + get_latency_scorecards.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/LatencyScorecard'} # type: ignore def get_timeseries( - self, resource_group_name, profile_name, experiment_name, start_date_time_utc, end_date_time_utc, aggregation_interval, timeseries_type, endpoint=None, country=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + profile_name, # type: str + experiment_name, # type: str + start_date_time_utc, # type: datetime.datetime + end_date_time_utc, # type: datetime.datetime + aggregation_interval, # type: Union[str, "_models.TimeseriesAggregationInterval"] + timeseries_type, # type: Union[str, "_models.TimeseriesType"] + endpoint=None, # type: Optional[str] + country=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.Timeseries" """Gets a Timeseries for a given Experiment. - :param resource_group_name: Name of the Resource group within the - Azure subscription. + Gets a Timeseries for a given Experiment. + + :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str - :param profile_name: The Profile identifier associated with the Tenant - and Partner + :param profile_name: The Profile identifier associated with the Tenant and Partner. :type profile_name: str - :param experiment_name: The Experiment identifier associated with the - Experiment + :param experiment_name: The Experiment identifier associated with the Experiment. :type experiment_name: str - :param start_date_time_utc: The start DateTime of the Timeseries in - UTC - :type start_date_time_utc: datetime - :param end_date_time_utc: The end DateTime of the Timeseries in UTC - :type end_date_time_utc: datetime - :param aggregation_interval: The aggregation interval of the - Timeseries. Possible values include: 'Hourly', 'Daily' - :type aggregation_interval: str or - ~azure.mgmt.frontdoor.models.TimeseriesAggregationInterval - :param timeseries_type: The type of Timeseries. Possible values - include: 'MeasurementCounts', 'LatencyP50', 'LatencyP75', 'LatencyP95' - :type timeseries_type: str or - ~azure.mgmt.frontdoor.models.TimeseriesType - :param endpoint: The specific endpoint + :param start_date_time_utc: The start DateTime of the Timeseries in UTC. + :type start_date_time_utc: ~datetime.datetime + :param end_date_time_utc: The end DateTime of the Timeseries in UTC. + :type end_date_time_utc: ~datetime.datetime + :param aggregation_interval: The aggregation interval of the Timeseries. + :type aggregation_interval: str or ~azure.mgmt.frontdoor.models.TimeseriesAggregationInterval + :param timeseries_type: The type of Timeseries. + :type timeseries_type: str or ~azure.mgmt.frontdoor.models.TimeseriesType + :param endpoint: The specific endpoint. :type endpoint: str - :param country: The country associated with the Timeseries. Values are - country ISO codes as specified here- - https://www.iso.org/iso-3166-country-codes.html + :param country: The country associated with the Timeseries. Values are country ISO codes as + specified here- https://www.iso.org/iso-3166-country-codes.html. :type country: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Timeseries or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.Timeseries or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Timeseries, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.Timeseries + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Timeseries"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-11-01" + accept = "application/json" + # Construct URL - url = self.get_timeseries.metadata['url'] + url = self.get_timeseries.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$') + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') query_parameters['startDateTimeUTC'] = self._serialize.query("start_date_time_utc", start_date_time_utc, 'iso-8601') query_parameters['endDateTimeUTC'] = self._serialize.query("end_date_time_utc", end_date_time_utc, 'iso-8601') query_parameters['aggregationInterval'] = self._serialize.query("aggregation_interval", aggregation_interval, 'str') @@ -186,29 +199,22 @@ def get_timeseries( query_parameters['country'] = self._serialize.query("country", country, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Timeseries', response) + deserialized = self._deserialize('Timeseries', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_timeseries.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/Timeseries'} + get_timeseries.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/Timeseries'} # type: ignore diff --git a/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_rules_engines_operations.py b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_rules_engines_operations.py new file mode 100644 index 00000000000..a2371619b13 --- /dev/null +++ b/src/internet-analyzer/azext_internet_analyzer/vendored_sdks/frontdoor/operations/_rules_engines_operations.py @@ -0,0 +1,449 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RulesEnginesOperations(object): + """RulesEnginesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.frontdoor.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_front_door( + self, + resource_group_name, # type: str + front_door_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RulesEngineListResult"] + """Lists all of the Rules Engine Configurations within a Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RulesEngineListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.frontdoor.models.RulesEngineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_front_door.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RulesEngineListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines'} # type: ignore + + def get( + self, + resource_group_name, # type: str + front_door_name, # type: str + rules_engine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RulesEngine" + """Gets a Rules Engine Configuration with the specified name within the specified Front Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RulesEngine, or the result of cls(response) + :rtype: ~azure.mgmt.frontdoor.models.RulesEngine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + front_door_name, # type: str + rules_engine_name, # type: str + rules_engine_parameters, # type: "_models.RulesEngine" + **kwargs # type: Any + ): + # type: (...) -> "_models.RulesEngine" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rules_engine_parameters, 'RulesEngine') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + front_door_name, # type: str + rules_engine_name, # type: str + rules_engine_parameters, # type: "_models.RulesEngine" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RulesEngine"] + """Creates a new Rules Engine Configuration with the specified name within the specified Front + Door. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :param rules_engine_parameters: Rules Engine Configuration properties needed to create a new + Rules Engine Configuration. + :type rules_engine_parameters: ~azure.mgmt.frontdoor.models.RulesEngine + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RulesEngine or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.frontdoor.models.RulesEngine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RulesEngine"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + rules_engine_name=rules_engine_name, + rules_engine_parameters=rules_engine_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RulesEngine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + front_door_name, # type: str + rules_engine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + front_door_name, # type: str + rules_engine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an existing Rules Engine Configuration with the specified parameters. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param front_door_name: Name of the Front Door which is globally unique. + :type front_door_name: str + :param rules_engine_name: Name of the Rules Engine which is unique within the Front Door. + :type rules_engine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + front_door_name=front_door_name, + rules_engine_name=rules_engine_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), + 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), + 'rulesEngineName': self._serialize.url("rules_engine_name", rules_engine_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}'} # type: ignore diff --git a/src/internet-analyzer/setup.py b/src/internet-analyzer/setup.py index f6f0145ddb6..d9ce1e856a8 100644 --- a/src/internet-analyzer/setup.py +++ b/src/internet-analyzer/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.0rc5' +VERSION = '0.1.0rc6' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -46,7 +46,7 @@ name='internet_analyzer', version=VERSION, description='Microsoft Azure Command-Line Tools Internet Analyzer Extension', - # TODO: Update author and email, if applicable + # TODO: Update author and email, if applicable author='Microsoft Corporation', author_email='azpycli@microsoft.com', url='https://github.com/Azure/azure-cli-extensions/tree/master/src/internet-analyzer', From 523e8692a2859be2aa125baa5d3059b0c62835e7 Mon Sep 17 00:00:00 2001 From: Super Date: Tue, 8 Jun 2021 11:35:16 +0800 Subject: [PATCH 02/37] AKS: support private cluster public fqdn feature with new api 2021-05-01 (#3465) * update sdk with latest swagger model * support public fqdn feature for private cluster * fix typo * fix comments * fix format * fix release history Co-authored-by: Li Ma --- src/aks-preview/HISTORY.md | 5 + src/aks-preview/azext_aks_preview/_help.py | 12 + src/aks-preview/azext_aks_preview/_params.py | 4 + src/aks-preview/azext_aks_preview/custom.py | 52 +- ...ks_create_private_cluster_public_fqdn.yaml | 1288 +++++++++++++++++ .../tests/latest/test_aks_commands.py | 33 + .../_managed_clusters_operations.py | 18 +- src/aks-preview/setup.py | 2 +- 8 files changed, 1399 insertions(+), 15 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_private_cluster_public_fqdn.yaml diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 27bdb57a9a0..8ed16b2b27b 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -3,6 +3,11 @@ Release History =============== +0.5.16 ++++++ +* Vendor SDK using latest swagger with optional query parameter added +* Support private cluster public fqdn feature + 0.5.15 +++++ * Update to use 2021-05-01 api-version diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 59d3b45db58..c23b2e0bc10 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -261,6 +261,9 @@ - name: --fqdn-subdomain type: string short-summary: Prefix for FQDN that is created for private cluster with custom private dns zone scenario. + - name: --enable-public-fqdn + type: bool + short-summary: (Preview) Enable public fqdn feature for private cluster. - name: --enable-node-public-ip type: bool short-summary: Enable VMSS node public IP. @@ -545,6 +548,12 @@ - name: --enable-local-accounts type: bool short-summary: (Preview) If set to true, will enable getting static credential for this cluster. + - name: --enable-public-fqdn + type: bool + short-summary: (Preview) Enable public fqdn feature for private cluster. + - name: --disable-public-fqdn + type: bool + short-summary: (Preview) Disable public fqdn feature for private cluster. examples: - name: Enable cluster-autoscaler within node count range [1,5] text: az aks update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n MyManagedCluster @@ -1108,6 +1117,9 @@ - name: --output -o type: string long-summary: Credentials are always in YAML format, so this argument is effectively ignored. + - name: --public-fqdn + type: bool + short-summary: (Preview) Get private cluster credential with server address to be public fqdn. examples: - name: Get access credentials for a managed Kubernetes cluster. (autogenerated) text: az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 5c7a618f291..14f494412ec 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -113,6 +113,7 @@ def load_arguments(self, _): c.argument('enable_private_cluster', action='store_true') c.argument('private_dns_zone') c.argument('fqdn_subdomain') + c.argument('enable_public_fqdn', action='store_true', is_preview=True) c.argument('enable_managed_identity', action='store_true') c.argument('assign_identity', type=str, validator=validate_assign_identity) c.argument('enable_sgxquotehelper', action='store_true') @@ -150,6 +151,8 @@ def load_arguments(self, _): c.argument('api_server_authorized_ip_ranges', type=str, validator=validate_ip_ranges) c.argument('enable_pod_security_policy', action='store_true') c.argument('disable_pod_security_policy', action='store_true') + c.argument('enable_public_fqdn', action='store_true', is_preview=True) + c.argument('disable_public_fqdn', action='store_true', is_preview=True) c.argument('attach_acr', acr_arg_type, validator=validate_acr) c.argument('detach_acr', acr_arg_type, validator=validate_acr) c.argument('aks_custom_headers') @@ -264,6 +267,7 @@ def load_arguments(self, _): c.argument('user', options_list=['--user', '-u'], default='clusterUser', validator=validate_user) c.argument('path', options_list=['--file', '-f'], type=file_type, completer=FilesCompleter(), default=os.path.join(os.path.expanduser('~'), '.kube', 'config')) + c.argument('public_fqdn', default=False, action='store_true', is_preview=True) with self.argument_context('aks pod-identity') as c: c.argument('cluster_name', type=str, help='The cluster name.') diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 64aff0b8467..d0c8e39d53c 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -43,6 +43,7 @@ import colorama # pylint: disable=import-error from tabulate import tabulate # pylint: disable=import-error from azure.cli.core.api import get_config_dir +from azure.cli.core.azclierror import ManualInterrupt, InvalidArgumentValueError, UnclassifiedUserFault, CLIInternalError, FileOperationError, ClientRequestError, DeploymentError, ValidationError, ArgumentUsageError, MutuallyExclusiveArgumentError, RequiredArgumentMissingError, ResourceNotFoundError from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id from azure.cli.core.keys import is_valid_ssh_rsa_public_key from azure.cli.core.util import get_file_json, in_cloud_console, shell_safe_json_parse, truncate_text, sdk_no_wait @@ -1010,6 +1011,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to private_dns_zone=None, enable_managed_identity=True, fqdn_subdomain=None, + enable_public_fqdn=False, api_server_authorized_ip_ranges=None, aks_custom_headers=None, appgw_name=None, @@ -1398,17 +1400,21 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to mc.node_resource_group = node_resource_group use_custom_private_dns_zone = False + if not enable_private_cluster and enable_public_fqdn: + raise ArgumentUsageError("--enable-public-fqdn should only be used with --enable-private-cluster") if enable_private_cluster: if load_balancer_sku.lower() != "standard": - raise CLIError( + raise ArgumentUsageError( "Please use standard load balancer for private cluster") mc.api_server_access_profile = ManagedClusterAPIServerAccessProfile( enable_private_cluster=True ) + if enable_public_fqdn: + mc.api_server_access_profile.enable_private_cluster_public_fqdn = True if private_dns_zone: if not enable_private_cluster: - raise CLIError( + raise ArgumentUsageError( "Invalid private dns zone for public cluster. It should always be empty for public cluster") mc.api_server_access_profile.private_dns_zone = private_dns_zone from msrestazure.tools import is_valid_resource_id @@ -1416,12 +1422,11 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to if is_valid_resource_id(private_dns_zone): use_custom_private_dns_zone = True else: - raise CLIError(private_dns_zone + - " is not a valid Azure resource ID.") + raise ResourceNotFoundError(private_dns_zone + " is not a valid Azure resource ID.") if fqdn_subdomain: if not use_custom_private_dns_zone: - raise CLIError( + raise ArgumentUsageError( "--fqdn-subdomain should only be used for private cluster with custom private dns zone") mc.fqdn_subdomain = fqdn_subdomain @@ -1501,6 +1506,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, disable_secret_rotation=False, disable_local_accounts=False, enable_local_accounts=False, + enable_public_fqdn=False, + disable_public_fqdn=False, yes=False, tags=None, windows_admin_password=None, @@ -1540,7 +1547,9 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, not tags and \ not windows_admin_password and \ not enable_local_accounts and \ - not disable_local_accounts: + not disable_local_accounts and \ + not enable_public_fqdn and \ + not disable_public_fqdn: raise CLIError('Please specify "--enable-cluster-autoscaler" or ' '"--disable-cluster-autoscaler" or ' '"--update-cluster-autoscaler" or ' @@ -1571,7 +1580,9 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, '"--enable-azure-rbac" or ' '"--disable-azure-rbac" or ' '"--enable-local-accounts" or ' - '"--disable-local-accounts"') + '"--disable-local-accounts" or ' + '"--enable-public-fqdn" or ' + '"--disable-public-fqdn"') instance = client.get(resource_group_name, name) if update_autoscaler and len(instance.agent_pool_profiles) > 1: @@ -1740,6 +1751,21 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if disable_ahub: instance.windows_profile.license_type = 'None' + if enable_public_fqdn and disable_public_fqdn: + raise MutuallyExclusiveArgumentError( + 'Cannot specify "--enable-public-fqdn" and "--disable-public-fqdn" at the same time') + is_private_cluster = instance.api_server_access_profile is not None and instance.api_server_access_profile.enable_private_cluster + if enable_public_fqdn: + if not is_private_cluster: + raise ArgumentUsageError('--enable-public-fqdn can only be used for private cluster') + instance.api_server_access_profile.enable_private_cluster_public_fqdn = True + if disable_public_fqdn: + if not is_private_cluster: + raise ArgumentUsageError('--disable-public-fqdn can only be used for private cluster') + if instance.api_server_access_profile.private_dns_zone.lower() == CONST_PRIVATE_DNS_ZONE_NONE: + raise ArgumentUsageError('--disable-public-fqdn cannot be applied for none mode private dns zone cluster') + instance.api_server_access_profile.enable_private_cluster_public_fqdn = False + if instance.auto_upgrade_profile is None: instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile() @@ -1891,18 +1917,22 @@ def aks_get_credentials(cmd, # pylint: disable=unused-argument path=os.path.join(os.path.expanduser( '~'), '.kube', 'config'), overwrite_existing=False, - context_name=None): + context_name=None, + public_fqdn=False): credentialResults = None + serverType = None + if public_fqdn: + serverType = 'public' if admin: credentialResults = client.list_cluster_admin_credentials( - resource_group_name, name) + resource_group_name, name, serverType) else: if user.lower() == 'clusteruser': credentialResults = client.list_cluster_user_credentials( - resource_group_name, name) + resource_group_name, name, serverType) elif user.lower() == 'clustermonitoringuser': credentialResults = client.list_cluster_monitoring_user_credentials( - resource_group_name, name) + resource_group_name, name, serverType) else: raise CLIError("The user is invalid.") if not credentialResults: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_private_cluster_public_fqdn.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_private_cluster_public_fqdn.yaml new file mode 100644 index 00000000000..3cf2cd388fe --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_private_cluster_public_fqdn.yaml @@ -0,0 +1,1288 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-06-07T05:53:41Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 07 Jun 2021 05:53:51 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": "westus2", "properties": {"kubernetesVersion": "", "dnsPrefix": + "cliakstest-clitest5mcnikium-8ecadf", "agentPoolProfiles": [{"count": 1, "vmSize": + "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": + "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": + "Delete", "enableEncryptionAtHost": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR"}]}}, + "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": + {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": + "loadBalancer", "loadBalancerSku": "standard"}, "apiServerAccessProfile": {"enablePrivateCluster": + true, "enablePrivateClusterPublicFQDN": true}, "disableLocalAccounts": false}, + "identity": {"type": "SystemAssigned"}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/EnablePrivateClusterPublicFQDN + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1373' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-05-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.19.11\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest5mcnikium-8ecadf\",\n \"fqdn\": \"cliakstest-clitest5mcnikium-8ecadf-d6f489fe.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"0ebcdadf2361915038345ff22c75e917-priv.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"privateFQDN\": \"cliakstest-clitest5mcnikium-8ecadf-5f3a2229.e3ea1835-ad19-4e03-9489-db955099a9bd.privatelink.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"\ + code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.19.11\",\n\ + \ \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"mode\"\ + : \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": \"\ + Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\"\ + ,\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"\ + adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n\ + \ {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n\ + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ + networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \ + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ + : 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"privateLinkResources\": [\n {\n \"name\"\ + : \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\"\ + ,\n \"groupId\": \"management\",\n \"requiredMembers\": [\n \"\ + management\"\n ]\n }\n ],\n \"apiServerAccessProfile\": {\n \ + \ \"enablePrivateCluster\": true,\n \"privateDNSZone\": \"system\",\n \ + \ \"enablePrivateClusterPublicFQDN\": true\n },\n \"disableLocalAccounts\"\ + : false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"\ + principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\":\ + \ \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3170' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:54:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:54:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:55:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:55:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:56:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:56:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:57:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:57:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:58:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:58:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:59:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 05:59:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/50b22411-dc76-4918-94ad-add69ea4cd1b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1124b250-76dc-1849-94ad-add69ea4cd1b\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-06-07T05:54:05.0233333Z\",\n \"\ + endTime\": \"2021-06-07T05:59:58.443807Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '169' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:00:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --generate-ssh-keys --enable-public-fqdn + --enable-private-cluster --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-05-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.19.11\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest5mcnikium-8ecadf\",\n \"fqdn\": \"cliakstest-clitest5mcnikium-8ecadf-d6f489fe.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"0ebcdadf2361915038345ff22c75e917-priv.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"privateFQDN\": \"cliakstest-clitest5mcnikium-8ecadf-5f3a2229.e3ea1835-ad19-4e03-9489-db955099a9bd.privatelink.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.19.11\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\"\ + : \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\"\ + ,\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"\ + adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n\ + \ {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n\ + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ + networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \ + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ + : 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/b3199125-8ad3-4b80-af09-854507b2979e\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"privateLinkResources\": [\n {\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\"\ + ,\n \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\"\ + ,\n \"groupId\": \"management\",\n \"requiredMembers\": [\n \"\ + management\"\n ]\n }\n ],\n \"apiServerAccessProfile\": {\n \ + \ \"enablePrivateCluster\": true,\n \"privateDNSZone\": \"system\",\n \ + \ \"enablePrivateClusterPublicFQDN\": true\n },\n \"identityProfile\"\ + : {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"\ + principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\":\ + \ \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4034' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:00:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-05-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.19.11\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest5mcnikium-8ecadf\",\n \"fqdn\": \"cliakstest-clitest5mcnikium-8ecadf-d6f489fe.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"0ebcdadf2361915038345ff22c75e917-priv.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"privateFQDN\": \"cliakstest-clitest5mcnikium-8ecadf-5f3a2229.e3ea1835-ad19-4e03-9489-db955099a9bd.privatelink.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.19.11\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\"\ + : \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\"\ + ,\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"\ + adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n\ + \ {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n\ + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ + networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \ + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ + : 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/b3199125-8ad3-4b80-af09-854507b2979e\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"privateLinkResources\": [\n {\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\"\ + ,\n \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\"\ + ,\n \"groupId\": \"management\",\n \"requiredMembers\": [\n \"\ + management\"\n ]\n }\n ],\n \"apiServerAccessProfile\": {\n \ + \ \"enablePrivateCluster\": true,\n \"privateDNSZone\": \"system\",\n \ + \ \"enablePrivateClusterPublicFQDN\": true\n },\n \"identityProfile\"\ + : {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"\ + principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\":\ + \ \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4034' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:00:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: '{"location": "westus2", "properties": {"kubernetesVersion": "1.19.11", + "dnsPrefix": "cliakstest-clitest5mcnikium-8ecadf", "agentPoolProfiles": [{"count": + 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", + "kubeletDiskType": "OS", "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", + "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "1.19.11", "enableNodePublicIP": false, "nodeLabels": {}, "enableEncryptionAtHost": + false, "enableFIPS": false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": + "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR"}]}}, + "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000001_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/b3199125-8ad3-4b80-af09-854507b2979e"}]}}, + "autoUpgradeProfile": {}, "apiServerAccessProfile": {"enablePrivateCluster": + true, "privateDNSZone": "system", "enablePrivateClusterPublicFQDN": false}, + "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "privateLinkResources": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management", + "name": "management", "type": "Microsoft.ContainerService/managedClusters/privateLinkResources", + "groupId": "management", "requiredMembers": ["management"]}], "disableLocalAccounts": + false}, "identity": {"type": "SystemAssigned"}, "sku": {"name": "Basic", "tier": + "Free"}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/EnablePrivateClusterPublicFQDN + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2702' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-05-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.19.11\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest5mcnikium-8ecadf\",\n \"azurePortalFQDN\": \"0ebcdadf2361915038345ff22c75e917-priv.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"privateFQDN\": \"cliakstest-clitest5mcnikium-8ecadf-5f3a2229.e3ea1835-ad19-4e03-9489-db955099a9bd.privatelink.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"\ + code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.19.11\",\n\ + \ \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"mode\"\ + : \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": \"\ + Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\"\ + ,\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"\ + adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n\ + \ {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n\ + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ + networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \ + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ + : 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/b3199125-8ad3-4b80-af09-854507b2979e\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"privateLinkResources\": [\n {\n \"name\"\ + : \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\"\ + ,\n \"groupId\": \"management\",\n \"requiredMembers\": [\n \"\ + management\"\n ],\n \"privateLinkServiceID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hcp-underlay-westus2-cx-154/providers/Microsoft.Network/privateLinkServices/a8e475f4473984e2ebabfd6ff511652b\"\ + \n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\"\ + : true,\n \"privateDNSZone\": \"system\",\n \"enablePrivateClusterPublicFQDN\"\ + : false\n },\n \"identityProfile\": {\n \"kubeletidentity\": {\n \ + \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"\ + principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\":\ + \ \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/68cd1a69-8146-4d44-940a-024053a358cf?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3960' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:00:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/68cd1a69-8146-4d44-940a-024053a358cf?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"691acd68-4681-444d-940a-024053a358cf\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T06:00:32.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:01:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/68cd1a69-8146-4d44-940a-024053a358cf?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"691acd68-4681-444d-940a-024053a358cf\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2021-06-07T06:00:32.1366666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:01:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/68cd1a69-8146-4d44-940a-024053a358cf?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"691acd68-4681-444d-940a-024053a358cf\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2021-06-07T06:00:32.1366666Z\",\n \"\ + endTime\": \"2021-06-07T06:01:39.8975854Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:02:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn --aks-custom-headers + User-Agent: + - python/3.8.9 (Linux-4.9.125-linuxkit-x86_64-with) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 (DOCKER) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-05-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.19.11\",\n \"dnsPrefix\"\ + : \"cliakstest-clitest5mcnikium-8ecadf\",\n \"azurePortalFQDN\": \"0ebcdadf2361915038345ff22c75e917-priv.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"privateFQDN\": \"cliakstest-clitest5mcnikium-8ecadf-5f3a2229.e3ea1835-ad19-4e03-9489-db955099a9bd.privatelink.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.19.11\"\ + ,\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n \"\ + mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\"\ + : \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\"\ + ,\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"\ + adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n\ + \ {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNGesZJ04maueBx9GlYIweh9+kFv4J3VceW73IaVpC7+5UIo0mOrKlkWGKoJx2z7PTfxjS3XJcJ2z8bQOyUpCqrY15P2xarBfRxpFjHqAuZRk234sBQ2DC9Txc1KpY+wzOEqaJDDyd+lmi0IqjGxsNPS65HbzuwCUziI2LjK61pwTALLnJv2HSn1/7003yIuu04IJXXSkncUZnp3a5Of/ek2+QU76/j02LYllctcGS2txei9g2zaipMBfZ9vnUCN9rxdqxbcKC1oFrVo+1reT/CvU3ej5cFKLRggZWHO/x+KYLtQDaVH61+sktlbj1CBCP8nTwKdLl+h9xCd0OJmDR\"\ + \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ + clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\"\ + : \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n\ + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ + networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \ + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ + : 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/b3199125-8ad3-4b80-af09-854507b2979e\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ + maxAgentPools\": 100,\n \"privateLinkResources\": [\n {\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\"\ + ,\n \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\"\ + ,\n \"groupId\": \"management\",\n \"requiredMembers\": [\n \"\ + management\"\n ]\n }\n ],\n \"apiServerAccessProfile\": {\n \ + \ \"enablePrivateCluster\": true,\n \"privateDNSZone\": \"system\",\n \ + \ \"enablePrivateClusterPublicFQDN\": false\n },\n \"identityProfile\"\ + : {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"\ + principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\":\ + \ \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3955' + content-type: + - application/json + date: + - Mon, 07 Jun 2021 06:02:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 5305a785b11..6ceda48f1bf 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -1233,6 +1233,39 @@ def test_aks_create_none_private_dns_zone(self, resource_group, resource_group_l self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_private_cluster_public_fqdn(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--node-count=1 --generate-ssh-keys ' \ + '--enable-public-fqdn --enable-private-cluster --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePrivateClusterPublicFQDN' + self.cmd(create_cmd, checks=[ + self.exists('privateFqdn'), + self.exists('fqdn'), + self.check('provisioningState', 'Succeeded'), + self.check('apiServerAccessProfile.enablePrivateClusterPublicFqdn', True), + ]) + + # update + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--disable-public-fqdn --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePrivateClusterPublicFQDN' + self.cmd(update_cmd, checks=[ + self.exists('privateFqdn'), + self.check('fqdn', None), + self.check('provisioningState', 'Succeeded'), + self.check('apiServerAccessProfile.enablePrivateClusterPublicFqdn', False), + ]) + @live_only() @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py index 84257ab8263..8fe243e5cf5 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py @@ -389,7 +389,7 @@ def get_access_profile( get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): """Gets cluster admin credential of a managed cluster. Gets cluster admin credential of the managed cluster with a specified @@ -399,6 +399,8 @@ def list_cluster_admin_credentials( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned + :type server_fqdn: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -422,6 +424,8 @@ def list_cluster_admin_credentials( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers header_parameters = {} @@ -454,7 +458,7 @@ def list_cluster_admin_credentials( list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): """Gets cluster user credential of a managed cluster. Gets cluster user credential of the managed cluster with a specified @@ -464,6 +468,8 @@ def list_cluster_user_credentials( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned + :type server_fqdn: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -487,6 +493,8 @@ def list_cluster_user_credentials( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers header_parameters = {} @@ -519,7 +527,7 @@ def list_cluster_user_credentials( list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): """Gets cluster monitoring user credential of a managed cluster. Gets cluster monitoring user credential of the managed cluster with a @@ -529,6 +537,8 @@ def list_cluster_monitoring_user_credentials( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned + :type server_fqdn: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -552,6 +562,8 @@ def list_cluster_monitoring_user_credentials( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers header_parameters = {} diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 7c24c7355eb..05fad97caec 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.15" +VERSION = "0.5.16" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From fa87f75b95b81394f7c34847c05770f557f71362 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Tue, 8 Jun 2021 14:37:13 +0800 Subject: [PATCH 03/37] [Release] Update index.json for extension [ internet-analyzer ] (#3471) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=934228 Last commit: https://github.com/Azure/azure-cli-extensions/commit/8bd68b5e77a5681de244d737ff391153a7234267 --- src/index.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/index.json b/src/index.json index 577906f1697..9b008ebd1a4 100644 --- a/src/index.json +++ b/src/index.json @@ -11448,6 +11448,51 @@ "version": "0.1.0rc5" }, "sha256Digest": "7e5ee753abece69fb917f3a96be4a3d8117ffbbbd75d18c2e54c74c0fe2b952e" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/internet_analyzer-0.1.0rc6-py2.py3-none-any.whl", + "filename": "internet_analyzer-0.1.0rc6-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/internet-analyzer" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "internet-analyzer", + "summary": "Microsoft Azure Command-Line Tools Internet Analyzer Extension", + "version": "0.1.0rc6" + }, + "sha256Digest": "0708d9f598d1618d138eebcf18354d97c7b3a2c90570959df077e04d419d32c3" } ], "ip-group": [ From cca419dde163ac1285a56f8ce6bde8cb3f8538db Mon Sep 17 00:00:00 2001 From: Artyom Pavlichenko Date: Mon, 7 Jun 2021 23:41:04 -0700 Subject: [PATCH 04/37] Fix extension file (#3466) * Added mysql default migration options and selected tables options for pg migrations * Fixing issue with rest call response exception * Wording --- src/dms-preview/HISTORY.rst | 10 +++ .../datamigration/models/__init__.py | 69 +++++++++++++++++++ src/dms-preview/setup.py | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/dms-preview/HISTORY.rst b/src/dms-preview/HISTORY.rst index d43345a4d1f..3a83faba663 100644 --- a/src/dms-preview/HISTORY.rst +++ b/src/dms-preview/HISTORY.rst @@ -1,3 +1,13 @@ +0.14.0 +++++++++++++++++++ + +* Resolving issue from rest response exception. + +0.13.0 +++++++++++++++++++ + +* Removing Oracle scenario due to it being deprecated. + 0.12.0 ++++++++++++++++++ diff --git a/src/dms-preview/azext_dms/vendored_sdks/datamigration/models/__init__.py b/src/dms-preview/azext_dms/vendored_sdks/datamigration/models/__init__.py index dd67362a1f2..5b98da9c16a 100644 --- a/src/dms-preview/azext_dms/vendored_sdks/datamigration/models/__init__.py +++ b/src/dms-preview/azext_dms/vendored_sdks/datamigration/models/__init__.py @@ -27,6 +27,9 @@ from ._models_py3 import ConnectToSourceMySqlTaskInput from ._models_py3 import ConnectToSourceMySqlTaskProperties from ._models_py3 import ConnectToSourceNonSqlTaskOutput + from ._models_py3 import ConnectToSourceOracleSyncTaskInput + from ._models_py3 import ConnectToSourceOracleSyncTaskOutput + from ._models_py3 import ConnectToSourceOracleSyncTaskProperties from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskInput from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskOutput from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskProperties @@ -44,6 +47,10 @@ from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskInput from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties from ._models_py3 import ConnectToTargetSqlDbTaskInput from ._models_py3 import ConnectToTargetSqlDbTaskOutput from ._models_py3 import ConnectToTargetSqlDbTaskProperties @@ -77,6 +84,9 @@ from ._models_py3 import GetTdeCertificatesSqlTaskOutput from ._models_py3 import GetTdeCertificatesSqlTaskProperties from ._models_py3 import GetUserTablesPostgreSqlTaskInput + from ._models_py3 import GetUserTablesOracleTaskInput + from ._models_py3 import GetUserTablesOracleTaskOutput + from ._models_py3 import GetUserTablesOracleTaskProperties from ._models_py3 import GetUserTablesPostgreSqlTaskOutput from ._models_py3 import GetUserTablesPostgreSqlTaskProperties from ._models_py3 import GetUserTablesSqlSyncTaskInput @@ -102,6 +112,15 @@ from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskProperties from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput + from ._models_py3 import MigrateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncDatabaseInput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskInput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputError + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput @@ -199,6 +218,8 @@ from ._models_py3 import NonSqlMigrationTaskOutput from ._models_py3 import ODataError from ._models_py3 import OrphanedUserInfo + from ._models_py3 import OracleConnectionInfo + from ._models_py3 import OracleOCIDriverInfo from ._models_py3 import PostgreSqlConnectionInfo from ._models_py3 import Project from ._models_py3 import ProjectFile @@ -243,6 +264,8 @@ from ._models_py3 import ValidateMigrationInputSqlServerSqlMITaskProperties from ._models_py3 import ValidateMongoDbTaskProperties from ._models_py3 import ValidateSyncMigrationInputSqlServerTaskInput + from ._models_py3 import ValidateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import ValidateOracleAzureDbPostgreSqlSyncTaskOutput from ._models_py3 import ValidateSyncMigrationInputSqlServerTaskOutput from ._models_py3 import ValidationError from ._models_py3 import WaitStatistics @@ -265,6 +288,9 @@ from ._models import ConnectToSourceMySqlTaskProperties from ._models import ConnectToSourceNonSqlTaskOutput from ._models import ConnectToSourcePostgreSqlSyncTaskInput + from ._models import ConnectToSourceOracleSyncTaskInput + from ._models import ConnectToSourceOracleSyncTaskOutput + from ._models import ConnectToSourceOracleSyncTaskProperties from ._models import ConnectToSourcePostgreSqlSyncTaskOutput from ._models import ConnectToSourcePostgreSqlSyncTaskProperties from ._models import ConnectToSourceSqlServerSyncTaskProperties @@ -282,6 +308,10 @@ from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties from ._models import ConnectToTargetSqlDbTaskInput + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties from ._models import ConnectToTargetSqlDbTaskOutput from ._models import ConnectToTargetSqlDbTaskProperties from ._models import ConnectToTargetSqlMISyncTaskInput @@ -314,6 +344,9 @@ from ._models import GetTdeCertificatesSqlTaskOutput from ._models import GetTdeCertificatesSqlTaskProperties from ._models import GetUserTablesPostgreSqlTaskInput + from ._models import GetUserTablesOracleTaskInput + from ._models import GetUserTablesOracleTaskOutput + from ._models import GetUserTablesOracleTaskProperties from ._models import GetUserTablesPostgreSqlTaskOutput from ._models import GetUserTablesPostgreSqlTaskProperties from ._models import GetUserTablesSqlSyncTaskInput @@ -339,6 +372,15 @@ from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel from ._models import MigrateMySqlAzureDbForMySqlSyncTaskProperties from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput + from ._models import MigrateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models import MigrateOracleAzureDbPostgreSqlSyncDatabaseInput + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskInput + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutput + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputError + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput @@ -436,6 +478,8 @@ from ._models import NonSqlMigrationTaskOutput from ._models import ODataError from ._models import OrphanedUserInfo + from ._models import OracleConnectionInfo + from ._models import OracleOCIDriverInfo from ._models import PostgreSqlConnectionInfo from ._models import Project from ._models import ProjectFile @@ -480,6 +524,8 @@ from ._models import ValidateMigrationInputSqlServerSqlMITaskProperties from ._models import ValidateMongoDbTaskProperties from ._models import ValidateSyncMigrationInputSqlServerTaskInput + from ._models import ValidateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models import ValidateOracleAzureDbPostgreSqlSyncTaskOutput from ._models import ValidateSyncMigrationInputSqlServerTaskOutput from ._models import ValidationError from ._models import WaitStatistics @@ -561,6 +607,9 @@ 'ConnectToSourceMySqlTaskProperties', 'ConnectToSourceNonSqlTaskOutput', 'ConnectToSourcePostgreSqlSyncTaskInput', + 'ConnectToSourceOracleSyncTaskInput', + 'ConnectToSourceOracleSyncTaskOutput', + 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSourcePostgreSqlSyncTaskOutput', 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSourceSqlServerSyncTaskProperties', @@ -578,6 +627,10 @@ 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput', 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTargetSqlDbTaskInput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTargetSqlDbTaskOutput', 'ConnectToTargetSqlDbTaskProperties', 'ConnectToTargetSqlMISyncTaskInput', @@ -610,6 +663,9 @@ 'GetTdeCertificatesSqlTaskOutput', 'GetTdeCertificatesSqlTaskProperties', 'GetUserTablesPostgreSqlTaskInput', + 'GetUserTablesOracleTaskInput', + 'GetUserTablesOracleTaskOutput', + 'GetUserTablesOracleTaskProperties', 'GetUserTablesPostgreSqlTaskOutput', 'GetUserTablesPostgreSqlTaskProperties', 'GetUserTablesSqlSyncTaskInput', @@ -635,6 +691,15 @@ 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput', + 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', + 'MigrateOracleAzureDbPostgreSqlSyncDatabaseInput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskInput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputError', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel', 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput', 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput', 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput', @@ -732,6 +797,8 @@ 'NonSqlMigrationTaskOutput', 'ODataError', 'OrphanedUserInfo', + 'OracleConnectionInfo', + 'OracleOCIDriverInfo', 'PostgreSqlConnectionInfo', 'Project', 'ProjectFile', @@ -776,6 +843,8 @@ 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMongoDbTaskProperties', 'ValidateSyncMigrationInputSqlServerTaskInput', + 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', + 'ValidateOracleAzureDbPostgreSqlSyncTaskOutput', 'ValidateSyncMigrationInputSqlServerTaskOutput', 'ValidationError', 'WaitStatistics', diff --git a/src/dms-preview/setup.py b/src/dms-preview/setup.py index 0df0a721e21..a8291c155d3 100644 --- a/src/dms-preview/setup.py +++ b/src/dms-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "0.13.0" +VERSION = "0.14.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 2c332d82a4ec9beea86eb203c6e9cf6baa92bd33 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Tue, 8 Jun 2021 15:06:28 +0800 Subject: [PATCH 05/37] [Release] Update index.json for extension [ dms-preview ] (#3473) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=934641 Last commit: https://github.com/Azure/azure-cli-extensions/commit/cca419dde163ac1285a56f8ce6bde8cb3f8538db --- src/index.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/index.json b/src/index.json index 9b008ebd1a4..8e4f2bbf85a 100644 --- a/src/index.json +++ b/src/index.json @@ -9286,6 +9286,51 @@ "version": "0.13.0" }, "sha256Digest": "c7d127332825d5f93c83ecfb3c46e9415e3cb0e4cee2c953287918b02757bc0c" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/dms_preview-0.14.0-py2.py3-none-any.whl", + "filename": "dms_preview-0.14.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.43", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "arpavlic@microsoft.com", + "name": "Artyom Pavlichenko", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/dms-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "dms-preview", + "summary": "Support for new Database Migration Service scenarios.", + "version": "0.14.0" + }, + "sha256Digest": "77680dfecb50e2a017314ff2b5f2e0340fec73f225b41f5668abc561aed088cd" } ], "eventgrid": [ From 6f9f864d62464d6151e56a19a345a88c2a87dcb4 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Tue, 8 Jun 2021 17:38:55 +0800 Subject: [PATCH 06/37] [Release] Update index.json for extension [ aks-preview ] (#3454) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=923395 Last commit: https://github.com/Azure/azure-cli-extensions/commit/dcd69291431ceb9b762d6a6ae5103cb529d3006e --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index 8e4f2bbf85a..5bd4ee00942 100644 --- a/src/index.json +++ b/src/index.json @@ -2960,6 +2960,49 @@ "version": "0.5.14" }, "sha256Digest": "635f9a1ed5cd480da0e730ddd3116bc352997120aa1feff1b3972067460bbc9f" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.15-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.15-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.15" + }, + "sha256Digest": "c5bc6296b75fcdaf2a499d34dfa184d6cdeda7a8abaf1306fd758dd04804e621" } ], "alertsmanagement": [ From 86565d9fd04b9a5709ac5266c39ac29a2a1084d1 Mon Sep 17 00:00:00 2001 From: Andy Zhang Date: Wed, 9 Jun 2021 14:53:38 +0800 Subject: [PATCH 07/37] aks: add 'enable-ultra-ssd' parameter (#3469) * aks: add 'enable-ultra-ssd' parameter fix comments fix comments * aks: add new version change * aks: add test test case --- src/aks-preview/HISTORY.md | 3 +++ src/aks-preview/azext_aks_preview/_help.py | 8 ++++++++ src/aks-preview/azext_aks_preview/_params.py | 2 ++ src/aks-preview/azext_aks_preview/custom.py | 4 ++++ .../tests/latest/test_aks_commands.py | 19 +++++++++++++++++++ .../tests/latest/test_run_command.py | 1 - src/aks-preview/setup.py | 2 +- 7 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 8ed16b2b27b..8db4cef062b 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -2,6 +2,9 @@ Release History =============== +0.5.17 ++++++ +* Add parameter '--enable-ultra-ssd' to enable UltraSSD on agent node pool 0.5.16 +++++ diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index c23b2e0bc10..e8db87e1c11 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -330,6 +330,9 @@ - name: --enable-encryption-at-host type: bool short-summary: Enable EncryptionAtHost on agent node pool. + - name: --enable-ultra-ssd + type: bool + short-summary: Enable UltraSSD on agent node pool. - name: --enable-secret-rotation type: bool short-summary: Enable secret rotation. Use with azure-keyvault-secrets-provider addon. @@ -375,6 +378,8 @@ text: az aks create -g MyResourceGroup -n MyManagedCluster --tags "foo=bar" "baz=qux" - name: Create a kubernetes cluster with EncryptionAtHost enabled. text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-encryption-at-host + - name: Create a kubernetes cluster with UltraSSD enabled. + text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-ultra-ssd - name: Create a kubernetes cluster with custom control plane identity and kubelet identity. text: az aks create -g MyResourceGroup -n MyManagedCluster --assign-identity --assign-kubelet-identity - name: Create a kubernetes cluster with Azure RBAC enabled. @@ -927,6 +932,9 @@ - name: --enable-encryption-at-host type: bool short-summary: Enable EncryptionAtHost on agent node pool. + - name: --enable-ultra-ssd + type: bool + short-summary: Enable UltraSSD on agent node pool. examples: - name: Create a nodepool in an existing AKS cluster with ephemeral os enabled. text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48 diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 14f494412ec..592134fdf19 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -129,6 +129,7 @@ def load_arguments(self, _): c.argument('appgw_watch_namespace', options_list=['--appgw-watch-namespace'], arg_group='Application Gateway') c.argument('aci_subnet_name', type=str) c.argument('enable_encryption_at_host', arg_type=get_three_state_flag(), help='Enable EncryptionAtHost.') + c.argument('enable_ultra_ssd', action='store_true') c.argument('enable_secret_rotation', action='store_true') c.argument('assign_kubelet_identity', type=str, validator=validate_assign_kubelet_identity) c.argument('disable_local_accounts', action='store_true') @@ -228,6 +229,7 @@ def load_arguments(self, _): c.argument('kubelet_config', type=str) c.argument('linux_os_config', type=str) c.argument('enable_encryption_at_host', options_list=['--enable-encryption-at-host'], action='store_true') + c.argument('enable_ultra_ssd', action='store_true') for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index d0c8e39d53c..d2ec9f5e72c 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1032,6 +1032,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to enable_pod_identity=False, enable_pod_identity_with_kubenet=False, enable_encryption_at_host=False, + enable_ultra_ssd=False, enable_secret_rotation=False, disable_local_accounts=False, no_wait=False, @@ -1093,6 +1094,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to enable_fips=enable_fips_image, node_public_ip_prefix_id=node_public_ip_prefix_id, enable_encryption_at_host=enable_encryption_at_host, + enable_ultra_ssd=enable_ultra_ssd, max_pods=int(max_pods) if max_pods else None, type=vm_set_type ) @@ -3022,6 +3024,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local kubelet_config=None, linux_os_config=None, enable_encryption_at_host=False, + enable_ultra_ssd=False, no_wait=False): instances = client.list(resource_group_name, cluster_name) for agentpool_profile in instances: @@ -3073,6 +3076,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local scale_set_priority=priority, upgrade_settings=upgradeSettings, enable_encryption_at_host=enable_encryption_at_host, + enable_ultra_ssd=enable_ultra_ssd, mode=mode ) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 6ceda48f1bf..f866c48bf10 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -1705,3 +1705,22 @@ def test_aks_disable_local_accounts(self, resource_group, resource_group_locatio # delete self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --node-vm-size Standard_D2s_v3 --zones 1 2 3 --enable-ultra-ssd' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_run_command.py b/src/aks-preview/azext_aks_preview/tests/latest/test_run_command.py index 9e41f0c64c5..ad5fa23b880 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_run_command.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_run_command.py @@ -74,6 +74,5 @@ def test_aks_run_command(self, resource_group, resource_group_location): self.check('exitCode', 0), ]) - if __name__ == '__main__': unittest.main() diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 05fad97caec..65fad37577a 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.16" +VERSION = "0.5.17" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 22a955b48c3ec6960ad4fa25f7c9a4f4e95c7f6c Mon Sep 17 00:00:00 2001 From: gossion Date: Wed, 9 Jun 2021 15:32:07 +0800 Subject: [PATCH 08/37] [AKS]Support aks egress-endpoints list operation (#3455) * Support aks egress-endpoints list operation * helper * review --- src/aks-preview/azext_aks_preview/_help.py | 10 + src/aks-preview/azext_aks_preview/commands.py | 4 + src/aks-preview/azext_aks_preview/custom.py | 4 + ...aks_update_to_msi_cluster_with_addons.yaml | 1161 +++++++---------- .../tests/latest/test_aks_commands.py | 5 + 5 files changed, 508 insertions(+), 676 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index e8db87e1c11..14c0928f8d5 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1187,3 +1187,13 @@ type: command short-summary: List pod identity exceptions in a managed Kubernetes cluster """ + +helps['aks egress-endpoints'] = """ + type: group + short-summary: Commands to manage egress endpoints in managed Kubernetes cluster. +""" + +helps['aks egress-endpoints list'] = """ + type: command + short-summary: List egress endpoints that are required or recommended to be whitelisted for a cluster. +""" diff --git a/src/aks-preview/azext_aks_preview/commands.py b/src/aks-preview/azext_aks_preview/commands.py index 42be808034e..03ab1069e77 100644 --- a/src/aks-preview/azext_aks_preview/commands.py +++ b/src/aks-preview/azext_aks_preview/commands.py @@ -120,3 +120,7 @@ def load_command_table(self, _): g.custom_command('update', 'aks_pod_identity_exception_update') g.custom_command('list', 'aks_pod_identity_exception_list', table_transformer=aks_pod_identity_exceptions_table_format) + + # AKS egress commands + with self.command_group('aks egress-endpoints', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: + g.custom_command('list', 'aks_egress_endpoints_list') diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index d2ec9f5e72c..65b525ae16b 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -4213,3 +4213,7 @@ def _ensure_cluster_identity_permission_on_kubelet_identity(cli_ctx, cluster_ide if not _add_role_assignment(cli_ctx, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, is_service_principal=False, scope=scope): raise CLIError('Could not grant Managed Identity Operator permission to cluster identity at scope {}'.format(scope)) + + +def aks_egress_endpoints_list(cmd, client, resource_group_name, name): # pylint: disable=unused-argument + return client.list_outbound_network_dependencies_endpoints(resource_group_name, name) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_to_msi_cluster_with_addons.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_to_msi_cluster_with_addons.yaml index 1682bd06ad7..83622bc1477 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_to_msi_cluster_with_addons.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_to_msi_cluster_with_addons.yaml @@ -13,15 +13,12 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2020-11-17T11:49:40Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2021-06-02T09:53:29Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -30,7 +27,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:49:42 GMT + - Wed, 02 Jun 2021 09:53:33 GMT expires: - '-1' pragma: @@ -58,15 +55,12 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2020-11-17T11:49:40Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2021-06-02T09:53:29Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -75,7 +69,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:49:41 GMT + - Wed, 02 Jun 2021 09:53:33 GMT expires: - '-1' pragma: @@ -103,10 +97,7 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: HEAD uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/DefaultResourceGroup-WEU?api-version=2020-10-01 response: @@ -120,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:49:42 GMT + - Wed, 02 Jun 2021 09:53:33 GMT expires: - '-1' pragma: @@ -148,14 +139,11 @@ interactions: Content-Length: - '26' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/DefaultResourceGroup-WEU?api-version=2020-10-01 response: @@ -169,7 +157,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:49:44 GMT + - Wed, 02 Jun 2021 09:53:36 GMT expires: - '-1' pragma: @@ -197,43 +185,39 @@ interactions: Content-Length: - '73' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-WEU/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-WEU?api-version=2015-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-WEU/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-WEU?api-version=2015-11-01-preview response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"85db0e89-7de2-4e86-b1b3-619371900321\",\r\n \"provisioningState\":\ - \ \"Creating\",\r\n \"sku\": {\r\n \"name\": \"standalone\",\r\n \ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": \"\ - Tue, 17 Nov 2020 11:49:51 GMT\"\r\n },\r\n \"retentionInDays\": 31,\r\ - \n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\":\ - \ 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Tue, 17 Nov 2020 19:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ - : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Tue, 17 Nov 2020 11:49:51 GMT\",\r\n \"modifiedDate\"\ - : \"Tue, 17 Nov 2020 11:49:51 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - ,\r\n \"name\": \"DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-WEU\"\ - ,\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\"\ - : \"westeurope\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"e3f619da-38bb-493c-812e-899fe351fb2f\",\r\n \"provisioningState\": \"Creating\",\r\n + \ \"sku\": {\r\n \"name\": \"standalone\",\r\n \"lastSkuUpdate\": + \"Wed, 02 Jun 2021 09:53:43 GMT\"\r\n },\r\n \"retentionInDays\": 31,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Wed, 02 Jun 2021 14:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Wed, 02 Jun 2021 09:53:43 GMT\",\r\n + \ \"modifiedDate\": \"Wed, 02 Jun 2021 09:53:43 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\",\r\n + \ \"name\": \"DefaultWorkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-WEU\",\r\n + \ \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\": + \"westeurope\"\r\n}" headers: cache-control: - no-cache content-length: - - '1205' + - '1161' content-type: - application/json date: - - Tue, 17 Nov 2020 11:49:51 GMT + - Wed, 02 Jun 2021 09:53:45 GMT pragma: - no-cache server: @@ -255,7 +239,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -265,37 +249,35 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-WEU/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-WEU?api-version=2015-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-WEU/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-WEU?api-version=2015-11-01-preview response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"85db0e89-7de2-4e86-b1b3-619371900321\",\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"standalone\",\r\n\ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\":\ - \ \"Tue, 17 Nov 2020 11:49:51 GMT\"\r\n },\r\n \"retentionInDays\":\ - \ 31,\r\n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\"\ - : 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Tue, 17 Nov 2020 19:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ - : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Tue, 17 Nov 2020 11:49:51 GMT\",\r\n \"modifiedDate\"\ - : \"Tue, 17 Nov 2020 11:49:52 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - ,\r\n \"name\": \"DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-WEU\"\ - ,\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\"\ - : \"westeurope\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"e3f619da-38bb-493c-812e-899fe351fb2f\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"standalone\",\r\n \"lastSkuUpdate\": + \"Wed, 02 Jun 2021 09:53:43 GMT\"\r\n },\r\n \"retentionInDays\": 31,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Wed, 02 Jun 2021 14:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Wed, 02 Jun 2021 09:53:43 GMT\",\r\n + \ \"modifiedDate\": \"Wed, 02 Jun 2021 09:53:45 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\",\r\n + \ \"name\": \"DefaultWorkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-WEU\",\r\n + \ \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\": + \"westeurope\"\r\n}" headers: cache-control: - no-cache content-length: - - '1206' + - '1162' content-type: - application/json date: - - Tue, 17 Nov 2020 11:50:21 GMT + - Wed, 02 Jun 2021 09:54:15 GMT pragma: - no-cache server: @@ -329,39 +311,35 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu?api-version=2015-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu?api-version=2015-11-01-preview response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"85db0e89-7de2-4e86-b1b3-619371900321\",\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"standalone\",\r\n\ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\":\ - \ \"Tue, 17 Nov 2020 11:49:51 GMT\"\r\n },\r\n \"retentionInDays\":\ - \ 31,\r\n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\"\ - : 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Tue, 17 Nov 2020 19:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ - : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Tue, 17 Nov 2020 11:49:51 GMT\",\r\n \"modifiedDate\"\ - : \"Tue, 17 Nov 2020 11:49:52 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - ,\r\n \"name\": \"DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-WEU\"\ - ,\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\"\ - : \"westeurope\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"e3f619da-38bb-493c-812e-899fe351fb2f\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"standalone\",\r\n \"lastSkuUpdate\": + \"Wed, 02 Jun 2021 09:53:43 GMT\"\r\n },\r\n \"retentionInDays\": 31,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Wed, 02 Jun 2021 14:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Wed, 02 Jun 2021 09:53:43 GMT\",\r\n + \ \"modifiedDate\": \"Wed, 02 Jun 2021 09:53:45 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\",\r\n + \ \"name\": \"DefaultWorkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-WEU\",\r\n + \ \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\": + \"westeurope\"\r\n}" headers: cache-control: - no-cache content-length: - - '1206' + - '1162' content-type: - application/json date: - - Tue, 17 Nov 2020 11:50:22 GMT + - Wed, 02 Jun 2021 09:54:16 GMT pragma: - no-cache server: @@ -400,9 +378,9 @@ interactions: "[Concat(''ContainerInsights'', ''('', split(parameters(''workspaceResourceId''),''/'')[8], '')'')]", "product": "[Concat(''OMSGallery/'', ''ContainerInsights'')]", "promotionCode": "", "publisher": "Microsoft"}}]}, "parameters": {}}}]}, "parameters": {"workspaceResourceId": - {"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu"}, + {"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu"}, "workspaceRegion": {"value": "westeurope"}, "solutionDeploymentName": {"value": - "ContainerInsights-1605613822659"}}, "mode": "Incremental"}}' + "ContainerInsights-1622627657048"}}, "mode": "incremental"}}' headers: Accept: - application/json @@ -415,22 +393,19 @@ interactions: Content-Length: - '1957' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1605613822659","name":"aks-monitoring-1605613822659","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13112976782773545168","parameters":{"workspaceResourceId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu"},"workspaceRegion":{"type":"String","value":"westeurope"},"solutionDeploymentName":{"type":"String","value":"ContainerInsights-1605613822659"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2020-11-17T11:50:28.4791752Z","duration":"PT1.5878262S","correlationId":"62d01916-5fd9-4be3-ae95-7dd273cc4716","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]}],"dependencies":[]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1622627657048","name":"aks-monitoring-1622627657048","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13112976782773545168","parameters":{"workspaceResourceId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu"},"workspaceRegion":{"type":"String","value":"westeurope"},"solutionDeploymentName":{"type":"String","value":"ContainerInsights-1622627657048"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-06-02T09:54:21.4982082Z","duration":"PT2.2165864S","correlationId":"e10e7fab-7968-4ca8-8132-9f6b57d49525","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]}],"dependencies":[]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1605613822659/operationStatuses/08585959930585862600?api-version=2020-10-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1622627657048/operationStatuses/08585789792261959975?api-version=2020-10-01 cache-control: - no-cache content-length: @@ -438,7 +413,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:50:28 GMT + - Wed, 02 Jun 2021 09:54:22 GMT expires: - '-1' pragma: @@ -454,18 +429,19 @@ interactions: message: Created - request: body: '{"location": "westeurope", "properties": {"kubernetesVersion": "", "dnsPrefix": - "cliakstest-clitestvt75wz634-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": + "cliakstest-clitestls4oi2hnm-c4528d", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": - "Delete", "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", - "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7"}]}}, - "servicePrincipalProfile": {"clientId": "00000000-0000-0000-0000-000000000001", - "secret": "fake-secret"}, "addonProfiles": {"omsagent": {"enabled": - true, "config": {"logAnalyticsWorkspaceResourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu"}}}, + "Delete", "enableEncryptionAtHost": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\n"}]}}, "addonProfiles": {"omsagent": {"enabled": true, "config": + {"logAnalyticsWorkspaceResourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu"}}}, "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", - "loadBalancerSku": "standard"}}}' + "loadBalancerSku": "standard"}, "disableLocalAccounts": false}, "identity": + {"type": "SystemAssigned"}}' headers: Accept: - application/json @@ -476,62 +452,64 @@ interactions: Connection: - keep-alive Content-Length: - - '1549' + - '1576' Content-Type: - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"\ - type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\"\ - : {\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"\ - code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"\ - dnsPrefix\": \"cliakstest-clitestvt75wz634-8ecadf\",\n \"fqdn\": \"cliakstest-clitestvt75wz634-8ecadf-dda3b8e6.hcp.westeurope.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"99a765df-ded7-42af-a027-736d86efbef4\"\n },\n \"addonProfiles\"\ - : {\n \"KubeDashboard\": {\n \"enabled\": true,\n \"config\": null\n\ - \ },\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n\ - \ \"logAnalyticsWorkspaceResourceID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - \n }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\"\ - ,\n \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"\ - networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ - : \"standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ - : {\n \"count\": 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\"\ - ,\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\"\ - ,\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"\ - loadBalancer\"\n },\n \"maxAgentPools\": 100\n },\n \"sku\": {\n \"\ - name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestls4oi2hnm-c4528d\",\n + \ \"fqdn\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.portal.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": + \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n \"type\": + \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 cache-control: - no-cache content-length: - - '2692' + - '3034' content-type: - application/json date: - - Tue, 17 Nov 2020 11:50:36 GMT + - Wed, 02 Jun 2021 09:54:37 GMT expires: - '-1' pragma: @@ -543,7 +521,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -551,7 +529,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -561,10 +539,9 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585959930585862600?api-version=2020-10-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585789792261959975?api-version=2020-10-01 response: body: string: '{"status":"Succeeded"}' @@ -576,7 +553,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:50:59 GMT + - Wed, 02 Jun 2021 09:54:52 GMT expires: - '-1' pragma: @@ -594,7 +571,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -604,13 +581,12 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + - AZURECLI/2.24.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1605613822659","name":"aks-monitoring-1605613822659","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13112976782773545168","parameters":{"workspaceResourceId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu"},"workspaceRegion":{"type":"String","value":"westeurope"},"solutionDeploymentName":{"type":"String","value":"ContainerInsights-1605613822659"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2020-11-17T11:50:38.8726163Z","duration":"PT11.9812673S","correlationId":"62d01916-5fd9-4be3-ae95-7dd273cc4716","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.OperationsManagement/solutions/ContainerInsights(defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu)"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.Resources/deployments/aks-monitoring-1622627657048","name":"aks-monitoring-1622627657048","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13112976782773545168","parameters":{"workspaceResourceId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu"},"workspaceRegion":{"type":"String","value":"westeurope"},"solutionDeploymentName":{"type":"String","value":"ContainerInsights-1622627657048"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-06-02T09:54:37.9825746Z","duration":"PT18.7009528S","correlationId":"e10e7fab-7968-4ca8-8132-9f6b57d49525","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/defaultresourcegroup-weu/providers/Microsoft.OperationsManagement/solutions/ContainerInsights(defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu)"}]}}' headers: cache-control: - no-cache @@ -619,7 +595,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:50:59 GMT + - Wed, 02 Jun 2021 09:54:53 GMT expires: - '-1' pragma: @@ -647,15 +623,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -664,7 +639,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:51:06 GMT + - Wed, 02 Jun 2021 09:55:08 GMT expires: - '-1' pragma: @@ -696,15 +671,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -713,7 +687,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:51:37 GMT + - Wed, 02 Jun 2021 09:55:39 GMT expires: - '-1' pragma: @@ -745,15 +719,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -762,7 +735,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:52:07 GMT + - Wed, 02 Jun 2021 09:56:10 GMT expires: - '-1' pragma: @@ -794,15 +767,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -811,7 +783,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:52:38 GMT + - Wed, 02 Jun 2021 09:56:41 GMT expires: - '-1' pragma: @@ -843,15 +815,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -860,7 +831,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:53:09 GMT + - Wed, 02 Jun 2021 09:57:12 GMT expires: - '-1' pragma: @@ -892,15 +863,14 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\"\n }" headers: cache-control: - no-cache @@ -909,7 +879,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:53:39 GMT + - Wed, 02 Jun 2021 09:57:43 GMT expires: - '-1' pragma: @@ -941,16 +911,15 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7385c65a-b924-402b-a762-35ebb2dc0482?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/26a4e0e4-cb43-4d03-a703-52f5787bd34c?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"5ac68573-24b9-2b40-a762-35ebb2dc0482\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2020-11-17T11:50:35.6454109Z\",\n \"\ - endTime\": \"2020-11-17T11:53:47.4711743Z\"\n }" + string: "{\n \"name\": \"e4e0a426-43cb-034d-a703-52f5787bd34c\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-06-02T09:54:36.5933333Z\",\n \"endTime\": + \"2021-06-02T09:58:06.7797641Z\"\n }" headers: cache-control: - no-cache @@ -959,7 +928,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:54:09 GMT + - Wed, 02 Jun 2021 09:58:14 GMT expires: - '-1' pragma: @@ -991,54 +960,60 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"\ - type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\"\ - : {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"\ - code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"\ - dnsPrefix\": \"cliakstest-clitestvt75wz634-8ecadf\",\n \"fqdn\": \"cliakstest-clitestvt75wz634-8ecadf-dda3b8e6.hcp.westeurope.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"99a765df-ded7-42af-a027-736d86efbef4\"\n },\n \"addonProfiles\"\ - : {\n \"KubeDashboard\": {\n \"enabled\": true,\n \"config\": null\n\ - \ },\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n\ - \ \"logAnalyticsWorkspaceResourceID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - \n }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\"\ - ,\n \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"\ - networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ - : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ - : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ - \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/999a2013-1ad3-47e7-8e81-a3f723db8b0e\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100\n },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\"\ - : \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestls4oi2hnm-c4528d\",\n + \ \"fqdn\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.portal.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": + \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\"\n + \ },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/7d3afeea-87aa-46de-bee6-6a25b48642ef\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '2963' + - '4069' content-type: - application/json date: - - Tue, 17 Nov 2020 11:54:10 GMT + - Wed, 02 Jun 2021 09:58:16 GMT expires: - '-1' pragma: @@ -1070,8 +1045,8 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: GET @@ -1088,7 +1063,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:54:11 GMT + - Wed, 02 Jun 2021 09:58:17 GMT expires: - '-1' pragma: @@ -1106,74 +1081,9 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --generate-ssh-keys --enable-addons - User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US - method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%2799a765df-ded7-42af-a027-736d86efbef4%27%29&api-version=1.6 - response: - body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"ebabf785-a678-4a41-b471-cc6e2b311526","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":[],"appDisplayName":"tosi6","appId":"99a765df-ded7-42af-a027-736d86efbef4","applicationTemplateId":null,"appOwnerTenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","appRoleAssignmentRequired":false,"appRoles":[],"displayName":"tosi6","errorUrl":null,"homepage":"http://056aa9.tosi6-tosi-8ecadf.eastus.cloudapp.azure.com","informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"keyCredentials":[],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access tosi6 on behalf of the signed-in user.","adminConsentDisplayName":"Access - tosi6","id":"d914f3c6-5f87-4250-8de3-27709e8de074","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access tosi6 on your behalf.","userConsentDisplayName":"Access - tosi6","value":"user_impersonation"}],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":"Microsoft","replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["http://056aa9.tosi6-tosi-8ecadf.eastus.cloudapp.azure.com","99a765df-ded7-42af-a027-736d86efbef4"],"servicePrincipalType":"Application","signInAudience":"AzureADMyOrg","tags":[],"tokenEncryptionKeyId":null}]}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '1683' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - date: - - Tue, 17 Nov 2020 11:54:11 GMT - duration: - - '991672' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - KN9FLoOXJNLBt57xpDVqw+OtALlS8Xn24E2AHIpICZk= - ocp-aad-session-key: - - iP-fGT2LkVbxS497CsQpCO37EHWxN1rfRmygM3f26O7_s5nHXDM1IT9psArNETzhGFjiY32ebYRbZd7G_6aGWoeMDBi8wh70A2OFiCJil_epQuYB0JJ8DXnEXUONNOlAKjU0iq7-2FuPULrGhHFtkhNP-1c59JkCCYNvN4W8xR4.dkDcXriDKM3df3B5QCdSDYTAlwFycMhqr19y24ed38E - pragma: - - no-cache - request-id: - - d8a48d60-7319-4fb7-8a33-ac30f71d5b8f - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '1' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK - request: body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb", - "principalId": "ebabf785-a678-4a41-b471-cc6e2b311526"}}' + "principalId":"00000000-0000-0000-0000-000000000001"}}' headers: Accept: - application/json @@ -1192,15 +1102,15 @@ interactions: ParameterSetName: - --resource-group --name --generate-ssh-keys --enable-addons User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/b0667b91-b8b8-407d-8423-babbfd4f1765?api-version=2020-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/377de7cb-05f0-4375-8989-a2868273a112?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb","principalId":"ebabf785-a678-4a41-b471-cc6e2b311526","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002","condition":null,"conditionVersion":null,"createdOn":"2020-11-17T11:54:12.3481123Z","updatedOn":"2020-11-17T11:54:12.3481123Z","createdBy":null,"updatedBy":"547f6960-a967-417a-a9a4-0f35fbdca11c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/b0667b91-b8b8-407d-8423-babbfd4f1765","type":"Microsoft.Authorization/roleAssignments","name":"b0667b91-b8b8-407d-8423-babbfd4f1765"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002","condition":null,"conditionVersion":null,"createdOn":"2021-06-02T09:58:18.0317316Z","updatedOn":"2021-06-02T09:58:18.3266729Z","createdBy":null,"updatedBy":"a75ea823-3748-4855-a4df-f4ba5383d006","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/377de7cb-05f0-4375-8989-a2868273a112","type":"Microsoft.Authorization/roleAssignments","name":"377de7cb-05f0-4375-8989-a2868273a112"}' headers: cache-control: - no-cache @@ -1209,7 +1119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:54:15 GMT + - Wed, 02 Jun 2021 09:58:22 GMT expires: - '-1' pragma: @@ -1239,56 +1149,62 @@ interactions: ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"\ - type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\"\ - : {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"\ - code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"\ - dnsPrefix\": \"cliakstest-clitestvt75wz634-8ecadf\",\n \"fqdn\": \"cliakstest-clitestvt75wz634-8ecadf-dda3b8e6.hcp.westeurope.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"99a765df-ded7-42af-a027-736d86efbef4\"\n },\n \"addonProfiles\"\ - : {\n \"KubeDashboard\": {\n \"enabled\": true,\n \"config\": null\n\ - \ },\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n\ - \ \"logAnalyticsWorkspaceResourceID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - \n }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\"\ - ,\n \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"\ - networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ - : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ - : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ - \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/999a2013-1ad3-47e7-8e81-a3f723db8b0e\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100\n },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\"\ - : \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestls4oi2hnm-c4528d\",\n + \ \"fqdn\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.portal.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": + \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\"\n + \ },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/7d3afeea-87aa-46de-bee6-6a25b48642ef\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '2963' + - '4069' content-type: - application/json date: - - Tue, 17 Nov 2020 11:54:15 GMT + - Wed, 02 Jun 2021 09:58:24 GMT expires: - '-1' pragma: @@ -1307,23 +1223,28 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westeurope", "properties": {"kubernetesVersion": "1.17.13", - "dnsPrefix": "cliakstest-clitestvt75wz634-8ecadf", "agentPoolProfiles": [{"count": + body: '{"location": "westeurope", "properties": {"kubernetesVersion": "1.19.11", + "dnsPrefix": "cliakstest-clitestls4oi2hnm-c4528d", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", - "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": - "System", "orchestratorVersion": "1.17.13", "enableNodePublicIP": false, "nodeLabels": - {}, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": - {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7"}]}}, - "servicePrincipalProfile": {"clientId": "00000000-0000-0000-0000-000000000001"}, - "addonProfiles": {"KubeDashboard": {"enabled": true}, "omsagent": {"enabled": - true, "config": {"logAnalyticsWorkspaceResourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu"}}}, + "kubeletDiskType": "OS", "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", + "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "1.19.11", "enableNodePublicIP": false, "nodeLabels": {}, "enableEncryptionAtHost": + false, "enableFIPS": false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": + "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "addonProfiles": {"omsagent": {"enabled": true, "config": {"logAnalyticsWorkspaceResourceID": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu"}}}, "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westeurope", "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": - {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/999a2013-1ad3-47e7-8e81-a3f723db8b0e"}]}}}, - "identity": {"type": "SystemAssigned"}, "sku": {"name": "Basic", "tier": "Free"}}' + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/7d3afeea-87aa-46de-bee6-6a25b48642ef"}]}}, + "autoUpgradeProfile": {}, "identityProfile": {"kubeletidentity": {"resourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "disableLocalAccounts": false}, "identity": {"type": "SystemAssigned"}, "sku": + {"name": "Basic", "tier": "Free"}}' headers: Accept: - application/json @@ -1334,66 +1255,68 @@ interactions: Connection: - keep-alive Content-Length: - - '2056' + - '2525' Content-Type: - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"\ - type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\"\ - : {\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"\ - code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"\ - dnsPrefix\": \"cliakstest-clitestvt75wz634-8ecadf\",\n \"fqdn\": \"cliakstest-clitestvt75wz634-8ecadf-dda3b8e6.hcp.westeurope.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Updating\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"msi\"\n },\n \"addonProfiles\": {\n \"KubeDashboard\"\ - : {\n \"enabled\": true,\n \"config\": null\n },\n \"omsagent\"\ - : {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - \n }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\"\ - ,\n \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"\ - networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ - : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ - : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ - \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/999a2013-1ad3-47e7-8e81-a3f723db8b0e\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\ - ,\n \"principalId\": \"a5fe4670-22ef-41cf-bcfd-93a714d08019\",\n \"tenantId\"\ - : \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ - : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestls4oi2hnm-c4528d\",\n + \ \"fqdn\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.portal.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Updating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": + \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/7d3afeea-87aa-46de-bee6-6a25b48642ef\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/0bb4c3e0-49bf-4cad-b3bf-67b6b0549b80?api-version=2017-08-31 cache-control: - no-cache content-length: - - '3090' + - '3701' content-type: - application/json date: - - Tue, 17 Nov 2020 11:54:22 GMT + - Wed, 02 Jun 2021 09:58:31 GMT expires: - '-1' pragma: @@ -1409,56 +1332,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks update - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-managed-identity --yes - User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 - response: - body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Tue, 17 Nov 2020 11:54:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff + - '1198' status: code: 200 message: OK @@ -1476,15 +1350,14 @@ interactions: ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/0bb4c3e0-49bf-4cad-b3bf-67b6b0549b80?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\"\n }" + string: "{\n \"name\": \"e0c3b40b-bf49-ad4c-b3bf-67b6b0549b80\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-02T09:58:29.7333333Z\"\n }" headers: cache-control: - no-cache @@ -1493,7 +1366,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Nov 2020 11:55:23 GMT + - Wed, 02 Jun 2021 09:59:02 GMT expires: - '-1' pragma: @@ -1525,24 +1398,24 @@ interactions: ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/0bb4c3e0-49bf-4cad-b3bf-67b6b0549b80?api-version=2017-08-31 response: body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\"\n }" + string: "{\n \"name\": \"e0c3b40b-bf49-ad4c-b3bf-67b6b0549b80\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-06-02T09:58:29.7333333Z\",\n \"endTime\": + \"2021-06-02T09:59:30.7068117Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '170' content-type: - application/json date: - - Tue, 17 Nov 2020 11:55:55 GMT + - Wed, 02 Jun 2021 09:59:33 GMT expires: - '-1' pragma: @@ -1574,24 +1447,60 @@ interactions: ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\"\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestls4oi2hnm-c4528d\",\n + \ \"fqdn\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.portal.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"osType\": + \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv0sUNfr3i8fLY+8AcZXg74hbym+rQBmQBMbpATyb15Km9U9d9oLT+4f77BT77feefiQtgyNB4kF2In20H6PaDqCnAJv9CaqsSb9by/pSg7GM/I08DNifXn10avFbaQL1Bk4UPf9ZrU9NPz1x7EjI/GBzJN5oww2sz3wL3tuEc5ILEXFJCSV24M2HtpgtobSSpYcY5SXCj1nniy+VKYf+f2AD0VjMF3J6JA5t4FFY/FzP5cy7p5DHeRc8S7MJOtqkNEiWosGBfZn46rreMdXn5TmNPNoCWtPvl3XVzFGmIIe00MSYvmZaxcucEQO9u87bw6Kk7CWytA4juZm0pDaWD + guwe@guwe-u1804\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-c4528d9e-c99a-48bb-b12d-fde2176a43b8-weu\"\n + \ },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/7d3afeea-87aa-46de-bee6-6a25b48642ef\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '126' + - '4069' content-type: - application/json date: - - Tue, 17 Nov 2020 11:56:27 GMT + - Wed, 02 Jun 2021 09:59:35 GMT expires: - '-1' pragma: @@ -1623,30 +1532,31 @@ interactions: ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.1 + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Monitoring%20Metrics%20Publisher%27&api-version=2018-01-01-preview response: body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\"\n }" + string: '{"value":[{"properties":{"roleName":"Monitoring Metrics Publisher","type":"BuiltInRole","description":"Enables + publishing metrics against Azure resources","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Insights/Register/Action","Microsoft.Support/*","Microsoft.Resources/subscriptions/resourceGroups/read"],"notActions":[],"dataActions":["Microsoft.Insights/Metrics/Write"],"notDataActions":[]}],"createdOn":"2018-08-14T00:36:16.5610279Z","updatedOn":"2018-08-14T00:37:18.1465065Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb","type":"Microsoft.Authorization/roleDefinitions","name":"3913510d-42f4-4e42-8a64-420c390055eb"}]}' headers: cache-control: - no-cache content-length: - - '126' + - '776' content-type: - - application/json + - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:56:57 GMT + - Wed, 02 Jun 2021 09:59:35 GMT expires: - '-1' pragma: - no-cache - server: - - nginx + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1659,7 +1569,8 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb", + "principalId":"00000000-0000-0000-0000-000000000001"}}' headers: Accept: - application/json @@ -1669,45 +1580,49 @@ interactions: - aks update Connection: - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production ParameterSetName: - --resource-group --name --enable-managed-identity --yes User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/601e0904-3be2-4025-a873-06c549279f7d?api-version=2017-08-31 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/fdfedb95-eadc-48ba-880e-55647fabe82b?api-version=2020-04-01-preview response: body: - string: "{\n \"name\": \"04091e60-e23b-2540-a873-06c549279f7d\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2020-11-17T11:54:20.8802935Z\",\n \"\ - endTime\": \"2020-11-17T11:57:03.1248067Z\"\n }" + string: '{"error":{"code":"RoleAssignmentExists","message":"The role assignment + already exists."}}' headers: cache-control: - no-cache content-length: - - '170' + - '89' content-type: - - application/json + - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 11:57:28 GMT + - Wed, 02 Jun 2021 09:59:36 GMT expires: - '-1' pragma: - no-cache - server: - - nginx + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 200 - message: OK + code: 409 + message: Conflict - request: body: null headers: @@ -1716,71 +1631,70 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - aks update + - aks egress-endpoints list Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --yes + - --resource-group --name User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.5 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python AZURECLI/2.24.1 + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/outboundNetworkDependenciesEndpoints?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westeurope\",\n \"name\": \"cliakstest000002\",\n \"\ - type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\"\ - : {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"\ - code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"\ - dnsPrefix\": \"cliakstest-clitestvt75wz634-8ecadf\",\n \"fqdn\": \"cliakstest-clitestvt75wz634-8ecadf-dda3b8e6.hcp.westeurope.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSlNNOwMw6aHvdkhUaMmfkjt19xPFa162alrqWaTFan0f864FGHVcSvXUvRBLeRj+x2RMlqr1TR6y73x07vqbaVApfssn52ROE3eKoX2cmez+EMaM19n2BzQLhr1lR/LkixeCM03/hYb3j16uaYeZ+zY060RdnVmPWVhslRRXmst+8cD3EXUkxdzmUa+J03nLyO8nqfCTKUltePz0FQ4IymD8ewa+sWgUlRKBwgoUBh35BFRAGq//OXuHFw6sowEIxwb5KSar4c2SHcewbSbuVFpWR7uhpYLXPJoISeASejQ4nfg+DlIbIf6mNwnLcqrHy6bwmwYeS36TUMHoxbCa7\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"msi\"\n },\n \"addonProfiles\": {\n \"KubeDashboard\"\ - : {\n \"enabled\": true,\n \"config\": null,\n \"identity\": {\n\ - \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-cliakstest000002\"\ - ,\n \"clientId\": \"01b73a5e-f8d5-476b-aa80-25a7a1d99dc9\",\n \"\ - objectId\": \"c5de591b-99fa-4ba8-8246-b27b46d10486\"\n }\n },\n \ - \ \"omsagent\": {\n \"enabled\": true,\n \"config\": {\n \"logAnalyticsWorkspaceResourceID\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-weu\"\ - \n },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-cliakstest000002\"\ - ,\n \"clientId\": \"25695453-a5a7-46b4-b57a-4428dac12797\",\n \"\ - objectId\": \"e16475ac-ece4-4af5-bab6-a2ee42745676\"\n }\n }\n },\n\ - \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westeurope\"\ - ,\n \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"\ - networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\"\ - : \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\"\ - : {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n \ - \ {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.Network/publicIPAddresses/999a2013-1ad3-47e7-8e81-a3f723db8b0e\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ - : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ - ,\n \"clientId\": \"08a0557f-793d-4754-9abe-e32e976405ab\",\n \"objectId\"\ - : \"6b23f90e-40e6-4604-a299-0a05f0567763\"\n }\n }\n },\n \"identity\"\ - : {\n \"type\": \"SystemAssigned\",\n \"principalId\": \"a5fe4670-22ef-41cf-bcfd-93a714d08019\"\ - ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ - : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"value\": [\n {\n \"category\": \"azure-resource-management\",\n + \ \"endpoints\": [\n {\n \"domainName\": \"management.azure.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"login.microsoftonline.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n }\n ]\n },\n {\n \"category\": + \"images\",\n \"endpoints\": [\n {\n \"domainName\": \"mcr.microsoft.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"*.data.mcr.microsoft.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\",\n \"description\": \"mcr cdn\"\n }\n ]\n }\n + \ ]\n },\n {\n \"category\": \"artifacts\",\n \"endpoints\": [\n + \ {\n \"domainName\": \"packages.microsoft.com\",\n \"endpointDetails\": + [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n + \ ]\n },\n {\n \"domainName\": \"acs-mirror.azureedge.net\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n }\n ]\n },\n {\n \"category\": + \"time-sync\",\n \"endpoints\": [\n {\n \"domainName\": \"ntp.ubuntu.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 123,\n \"protocol\": + \"UDP\"\n }\n ]\n }\n ]\n },\n {\n \"category\": + \"ubuntu-optional\",\n \"endpoints\": [\n {\n \"domainName\": + \"security.ubuntu.com\",\n \"endpointDetails\": [\n {\n \"port\": + 80,\n \"protocol\": \"Http\"\n }\n ]\n },\n {\n + \ \"domainName\": \"azure.archive.ubuntu.com\",\n \"endpointDetails\": + [\n {\n \"port\": 80,\n \"protocol\": \"Http\"\n }\n + \ ]\n },\n {\n \"domainName\": \"changelogs.ubuntu.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 80,\n \"protocol\": + \"Http\"\n }\n ]\n }\n ]\n },\n {\n \"category\": + \"apiserver\",\n \"endpoints\": [\n {\n \"domainName\": \"cliakstest-clitestls4oi2hnm-c4528d-99d569e1.hcp.westeurope.azmk8s.io\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n }\n ]\n },\n {\n \"category\": + \"addon-monitoring\",\n \"endpoints\": [\n {\n \"domainName\": + \"dc.services.visualstudio.com\",\n \"endpointDetails\": [\n {\n + \ \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n + \ },\n {\n \"domainName\": \"*.ods.opinsights.azure.com\",\n \"endpointDetails\": + [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n + \ ]\n },\n {\n \"domainName\": \"*.oms.opinsights.azure.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"*.monitoring.azure.com\",\n + \ \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": + \"Https\"\n }\n ]\n }\n ]\n }\n ]\n }" headers: cache-control: - no-cache content-length: - - '4227' + - '3015' content-type: - application/json date: - - Tue, 17 Nov 2020 11:57:29 GMT + - Wed, 02 Jun 2021 09:59:37 GMT expires: - '-1' pragma: @@ -1798,110 +1712,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks update - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --enable-managed-identity --yes - User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Monitoring%20Metrics%20Publisher%27&api-version=2018-01-01-preview - response: - body: - string: '{"value":[{"properties":{"roleName":"Monitoring Metrics Publisher","type":"BuiltInRole","description":"Enables - publishing metrics against Azure resources","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Insights/Register/Action","Microsoft.Support/*","Microsoft.Resources/subscriptions/resourceGroups/read"],"notActions":[],"dataActions":["Microsoft.Insights/Metrics/Write"],"notDataActions":[]}],"createdOn":"2018-08-14T00:36:16.5610279Z","updatedOn":"2018-08-14T00:37:18.1465065Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb","type":"Microsoft.Authorization/roleDefinitions","name":"3913510d-42f4-4e42-8a64-420c390055eb"}]}' - headers: - cache-control: - - no-cache - content-length: - - '776' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 17 Nov 2020 11:57:29 GMT - expires: - - '-1' - pragma: - - no-cache - set-cookie: - - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly - 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb", - "principalId": "e16475ac-ece4-4af5-bab6-a2ee42745676"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks update - Connection: - - keep-alive - Content-Length: - - '233' - Content-Type: - - application/json; charset=utf-8 - Cookie: - - x-ms-gateway-slice=Production - ParameterSetName: - - --resource-group --name --enable-managed-identity --yes - User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.15.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/601cb81a-add4-477f-9273-1587fc2f72a1?api-version=2020-04-01-preview - response: - body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb","principalId":"e16475ac-ece4-4af5-bab6-a2ee42745676","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002","condition":null,"conditionVersion":null,"createdOn":"2020-11-17T11:57:30.2942150Z","updatedOn":"2020-11-17T11:57:30.2942150Z","createdBy":null,"updatedBy":"547f6960-a967-417a-a9a4-0f35fbdca11c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.Authorization/roleAssignments/601cb81a-add4-477f-9273-1587fc2f72a1","type":"Microsoft.Authorization/roleAssignments","name":"601cb81a-add4-477f-9273-1587fc2f72a1"}' - headers: - cache-control: - - no-cache - content-length: - - '1029' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 17 Nov 2020 11:57:32 GMT - expires: - - '-1' - pragma: - - no-cache - set-cookie: - - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created - request: body: null headers: @@ -1918,9 +1728,8 @@ interactions: ParameterSetName: - -g -n --yes --no-wait User-Agent: - - python/3.6.9 (Linux-5.0.0-1035-azure-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.11 - msrest_azure/0.6.3 azure-mgmt-containerservice/9.4.0 Azure-SDK-For-Python - AZURECLI/2.15.0 + - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-containerservice/11.2.0 Azure-SDK-For-Python AZURECLI/2.24.1 accept-language: - en-US method: DELETE @@ -1930,17 +1739,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/6d671bf1-b844-458b-9787-ee414d87b558?api-version=2017-08-31 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7a9ca7bc-86bd-47e9-92bf-ab2d17e37ca6?api-version=2017-08-31 cache-control: - no-cache content-length: - '0' date: - - Tue, 17 Nov 2020 11:57:33 GMT + - Wed, 02 Jun 2021 09:59:41 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operationresults/6d671bf1-b844-458b-9787-ee414d87b558?api-version=2017-08-31 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operationresults/7a9ca7bc-86bd-47e9-92bf-ab2d17e37ca6?api-version=2017-08-31 pragma: - no-cache server: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index f866c48bf10..efb06b5e1eb 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -1140,6 +1140,11 @@ def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_gr self.check('identity.type', 'SystemAssigned') ]) + # check egress + endpoints = self.cmd('aks egress-endpoints list --resource-group={resource_group} --name={name}').get_output_in_json() + categories = [e["category"] for e in endpoints] + assert "addon-monitoring" in categories + # delete self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) From 7b11a500d3d67ffc54e5ab079817ced8c17ce4f2 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 9 Jun 2021 15:32:44 +0800 Subject: [PATCH 09/37] [Release] Update index.json for extension [ aks-preview ] (#3479) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=937999 Last commit: https://github.com/Azure/azure-cli-extensions/commit/86565d9fd04b9a5709ac5266c39ac29a2a1084d1 --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index 5bd4ee00942..1b804c7e554 100644 --- a/src/index.json +++ b/src/index.json @@ -3003,6 +3003,49 @@ "version": "0.5.15" }, "sha256Digest": "c5bc6296b75fcdaf2a499d34dfa184d6cdeda7a8abaf1306fd758dd04804e621" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.17-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.17-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.17" + }, + "sha256Digest": "f66ae6e946086716458c92f46062a37ff2f2c841a8b002badb17a78fba2520f4" } ], "alertsmanagement": [ From 2a79812a2b48c7f7560dec6abab49039e8d8330e Mon Sep 17 00:00:00 2001 From: Jiaxiao Zhou Date: Wed, 9 Jun 2021 00:49:02 -0700 Subject: [PATCH 10/37] az ml 2.0.1a1 release (#3464) * added ml * reformatted * removed some dependencies which azure-cli have * updated index.json * updated * updated * added ml to index.json * updated wheel * added a5 * bump version to 1.0.0a6 * updated to 2.0.0a1 * updated hash * bump version to 2.0.1a1 * updated * updated * update * release cut * fix --- src/index.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/index.json b/src/index.json index 1b804c7e554..3b010bdddc5 100644 --- a/src/index.json +++ b/src/index.json @@ -13496,6 +13496,56 @@ "version": "2.0.0a1" }, "sha256Digest": "da1a040a0755f2b6898ac6ed9f90241a38b776031e74d070431cd2ba63a13ea3" + }, + { + "downloadUrl": "https://azuremlsdktestpypi.blob.core.windows.net/wheels/sdk-cli-v2-public/ml-2.0.1a1-py3-none-any.whl", + "filename": "ml-2.0.1a1-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/machinelearningservices" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "ml", + "run_requires": [ + { + "requires": [ + "azure-identity", + "azure-storage-blob (<=12.5.0,>12.0.0b4)", + "azure-storage-file-share (==12.3.0)", + "cryptography (<=3.3.2)", + "docker (>=4.0.0,~=5.0.0)", + "isodate", + "marshmallow (<4.0.0,>=3.5)", + "pathspec (==0.8.*)", + "pydash (<=4.9.0)", + "pyjwt (<2.0.0)", + "tqdm" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools AzureMachineLearningWorkspaces Extension", + "version": "2.0.1a1" + }, + "sha256Digest": "079a8f3ecf3f0816a8afd4fe65303940721679f02718f70ddb706934201ada50" } ], "monitor-control-service": [ From 7b268e02c1a402031b98c8eeb4fe971253733a78 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 9 Jun 2021 17:28:41 +0800 Subject: [PATCH 11/37] [Release] Update index.json for extension [ aks-preview ] (#3480) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=938094 Last commit: https://github.com/Azure/azure-cli-extensions/commit/22a955b48c3ec6960ad4fa25f7c9a4f4e95c7f6c Co-authored-by: Xing Zhou --- src/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.json b/src/index.json index 3b010bdddc5..a925668a147 100644 --- a/src/index.json +++ b/src/index.json @@ -3045,7 +3045,7 @@ "summary": "Provides a preview for upcoming AKS features", "version": "0.5.17" }, - "sha256Digest": "f66ae6e946086716458c92f46062a37ff2f2c841a8b002badb17a78fba2520f4" + "sha256Digest": "add861fdea86d7789a0680a3db61fbc32736849c137eb043cb4496f1ee07b742" } ], "alertsmanagement": [ From d2e621b89d3f71aac7fc8033b6e4544e98a1d046 Mon Sep 17 00:00:00 2001 From: Sambit Rath Date: Wed, 9 Jun 2021 19:10:38 +0530 Subject: [PATCH 12/37] [Dataprotection] Onboard new RP Dataprotection to azure-cli-extensions (#3459) * Initial commit * ci fixes * addes service name * Added codeowners * Added more tests * Added backup-vault list command * Renamed commands * typo * linter fix * update * resolving comments * Changed restore request parameter name --- .github/CODEOWNERS | 2 + src/dataprotection/HISTORY.rst | 8 + src/dataprotection/README.md | 166 + .../azext_dataprotection/__init__.py | 59 + .../azext_dataprotection/action.py | 20 + .../azext_dataprotection/azext_metadata.json | 4 + .../azext_dataprotection/custom.py | 20 + .../generated/__init__.py | 12 + .../generated/_client_factory.py | 40 + .../azext_dataprotection/generated/_help.py | 465 ++ .../azext_dataprotection/generated/_params.py | 195 + .../generated/_validators.py | 9 + .../azext_dataprotection/generated/action.py | 170 + .../generated/commands.py | 116 + .../azext_dataprotection/generated/custom.py | 301 ++ .../manual/Manifests/AzureBlob.py | 49 + .../manual/Manifests/AzureDisk.py | 80 + .../manual/Manifests/__init__.py | 12 + .../manual/Manifests/config.py | 6 + .../azext_dataprotection/manual/__init__.py | 12 + .../manual/_client_factory.py | 11 + .../azext_dataprotection/manual/_help.py | 208 + .../azext_dataprotection/manual/_params.py | 154 + .../manual/_validators.py | 25 + .../manual/backupcenter_helper.py | 66 + .../azext_dataprotection/manual/commands.py | 55 + .../azext_dataprotection/manual/custom.py | 541 +++ .../azext_dataprotection/manual/enums.py | 62 + .../azext_dataprotection/manual/helpers.py | 85 + .../manual/tests/__init__.py | 12 + .../manual/tests/latest/__init__.py | 12 + .../latest/test_dataprotection_scenario.py | 157 + .../azext_dataprotection/tests/__init__.py | 116 + .../tests/latest/__init__.py | 12 + .../tests/latest/example_steps.py | 397 ++ .../test_dataprotection_Scenario.yaml | 4144 ++++++++++++++++ .../latest/test_dataprotection_scenario.py | 138 + .../test_dataprotection_scenario_coverage.md | 2 + .../vendored_sdks/__init__.py | 12 + .../vendored_sdks/dataprotection/__init__.py | 16 + .../dataprotection/_configuration.py | 70 + .../dataprotection/_data_protection_client.py | 130 + .../dataprotection/aio/__init__.py | 10 + .../dataprotection/aio/_configuration.py | 66 + .../aio/_data_protection_client.py | 124 + .../dataprotection/aio/operations/__init__.py | 37 + .../_backup_instances_operations.py | 1116 +++++ .../operations/_backup_policies_operations.py | 313 ++ ...ckup_vault_operation_results_operations.py | 103 + .../operations/_backup_vaults_operations.py | 616 +++ .../operations/_data_protection_operations.py | 105 + .../_data_protection_operations_operations.py | 104 + ...export_jobs_operation_result_operations.py | 107 + .../aio/operations/_export_jobs_operations.py | 156 + .../aio/operations/_jobs_operations.py | 179 + .../_operation_result_operations.py | 109 + .../_operation_status_operations.py | 101 + .../operations/_recovery_points_operations.py | 196 + .../_restorable_time_ranges_operations.py | 111 + .../dataprotection/models/__init__.py | 369 ++ .../models/_data_protection_client_enums.py | 204 + .../dataprotection/models/_models.py | 3808 +++++++++++++++ .../dataprotection/models/_models_py3.py | 4174 +++++++++++++++++ .../dataprotection/operations/__init__.py | 37 + .../_backup_instances_operations.py | 1136 +++++ .../operations/_backup_policies_operations.py | 321 ++ ...ckup_vault_operation_results_operations.py | 108 + .../operations/_backup_vaults_operations.py | 629 +++ .../operations/_data_protection_operations.py | 110 + .../_data_protection_operations_operations.py | 109 + ...export_jobs_operation_result_operations.py | 112 + .../operations/_export_jobs_operations.py | 162 + .../operations/_jobs_operations.py | 185 + .../_operation_result_operations.py | 114 + .../_operation_status_operations.py | 106 + .../operations/_recovery_points_operations.py | 202 + .../_restorable_time_ranges_operations.py | 116 + .../vendored_sdks/dataprotection/py.typed | 1 + src/dataprotection/setup.cfg | 1 + src/dataprotection/setup.py | 58 + src/service_name.json | 5 + 81 files changed, 23791 insertions(+) create mode 100644 src/dataprotection/HISTORY.rst create mode 100644 src/dataprotection/README.md create mode 100644 src/dataprotection/azext_dataprotection/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/action.py create mode 100644 src/dataprotection/azext_dataprotection/azext_metadata.json create mode 100644 src/dataprotection/azext_dataprotection/custom.py create mode 100644 src/dataprotection/azext_dataprotection/generated/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/generated/_client_factory.py create mode 100644 src/dataprotection/azext_dataprotection/generated/_help.py create mode 100644 src/dataprotection/azext_dataprotection/generated/_params.py create mode 100644 src/dataprotection/azext_dataprotection/generated/_validators.py create mode 100644 src/dataprotection/azext_dataprotection/generated/action.py create mode 100644 src/dataprotection/azext_dataprotection/generated/commands.py create mode 100644 src/dataprotection/azext_dataprotection/generated/custom.py create mode 100644 src/dataprotection/azext_dataprotection/manual/Manifests/AzureBlob.py create mode 100644 src/dataprotection/azext_dataprotection/manual/Manifests/AzureDisk.py create mode 100644 src/dataprotection/azext_dataprotection/manual/Manifests/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/manual/Manifests/config.py create mode 100644 src/dataprotection/azext_dataprotection/manual/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/manual/_client_factory.py create mode 100644 src/dataprotection/azext_dataprotection/manual/_help.py create mode 100644 src/dataprotection/azext_dataprotection/manual/_params.py create mode 100644 src/dataprotection/azext_dataprotection/manual/_validators.py create mode 100644 src/dataprotection/azext_dataprotection/manual/backupcenter_helper.py create mode 100644 src/dataprotection/azext_dataprotection/manual/commands.py create mode 100644 src/dataprotection/azext_dataprotection/manual/custom.py create mode 100644 src/dataprotection/azext_dataprotection/manual/enums.py create mode 100644 src/dataprotection/azext_dataprotection/manual/helpers.py create mode 100644 src/dataprotection/azext_dataprotection/manual/tests/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/manual/tests/latest/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/manual/tests/latest/test_dataprotection_scenario.py create mode 100644 src/dataprotection/azext_dataprotection/tests/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/tests/latest/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/tests/latest/example_steps.py create mode 100644 src/dataprotection/azext_dataprotection/tests/latest/recordings/test_dataprotection_Scenario.yaml create mode 100644 src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario.py create mode 100644 src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario_coverage.md create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_configuration.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_data_protection_client.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_configuration.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_data_protection_client.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_instances_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_policies_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vault_operation_results_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vaults_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operation_result_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_jobs_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_result_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_status_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_recovery_points_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_restorable_time_ranges_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_data_protection_client_enums.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models_py3.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/__init__.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_instances_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vault_operation_results_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vaults_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operation_result_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_jobs_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_result_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_status_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_recovery_points_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_restorable_time_ranges_operations.py create mode 100644 src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/py.typed create mode 100644 src/dataprotection/setup.cfg create mode 100644 src/dataprotection/setup.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bda2c789d63..7f47030d07e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -195,3 +195,5 @@ /src/connectedvmware/ @sanmishra18 /src/diskpool/ @Juliehzl + +/src/dataprotection/ @sambitratha diff --git a/src/dataprotection/HISTORY.rst b/src/dataprotection/HISTORY.rst new file mode 100644 index 00000000000..1c139576ba0 --- /dev/null +++ b/src/dataprotection/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. diff --git a/src/dataprotection/README.md b/src/dataprotection/README.md new file mode 100644 index 00000000000..51e63b7bd7c --- /dev/null +++ b/src/dataprotection/README.md @@ -0,0 +1,166 @@ +# Azure CLI dataprotection Extension # +This is the extension for dataprotection + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name dataprotection +``` + +### Included Features ### +#### Configure backup #### +##### Initialize configure backup request ##### +``` +az dataprotection backup-instance initialize --datasource-type AzureDisk -l southeastasia \ + --policy-id {disk_policy_id} --datasource-id {disk_id} +``` + +Please copy paste the output of the above command and save it in a json file. e.g. backup_instance.json. +Based on datasource type, you might have to edit the json file and add some parameters. + +##### Validate configure backup request ##### +``` +az dataprotection backup-instance validate-for-backup -g sarath-rg --vault-name sarath-vault --backup-instance backup_instance.json +``` + +If validation fails then please fix the error by following the recommendations. +##### Configure backup ##### +``` +az dataprotection backup-instance create -g MyResourceGroup --vault-name MyVault --backup-instance backup_instance.json +``` +#### Create Policy #### +##### Get default policy template ##### +``` +az dataprotection backup-policy get-default-policy-template --datasource-type AzureDisk +``` +Save the output of above command in a json file. e.g. defaultpolicy.json +##### Add retention rule to default policy ##### +``` +az dataprotection backup-policy retention-rule create-lifecycle --retention-duration-count 12 \ + --retention-duration-type Days --source-datastore OperationalStore +``` +Save the output of above command in a json file e.g. lifecycle.json +``` +az dataprotection backup-policy retention-rule set --lifecycles lifecycle.json --name Daily --policy defaultpolicy.json +``` +Save the output of above command in a json file e.g. editedpolicy.json +##### Add tag rule to policy ##### +``` +az dataprotection backup-policy tag create-absolute-criteria --absolute-criteria FirstOfDay +``` +Save the output of above command in a json file e.g. criteria.json +``` +az dataprotection backup-policy tag set --criteria criteria.json --name Daily --policy editedpolicy.json +``` +##### Create backup policy ##### +``` +az dataprotection backup-policy create -g sarath-rg --vault-name sarath-vault -n mypolicy --policy policy.json +``` +#### Restore a backup instance #### +##### Initialize restore request for item recovery ##### +``` +az dataprotection backup-instance restore initialize-for-data-recovery --datasource-type AzureBlob \ + --restore-location centraluseuap --source-datastore OperationalStore --backup-instance-id {backup_instance_id} \ + --point-in-time 2021-05-26T15:00:00 --container-list container1 container2 +``` +##### Initialize restore request for data recovery ##### +``` +az dataprotection backup-instance restore initialize-for-data-recovery --datasource-type AzureDisk \ + --restore-location centraluseuap --source-datastore OperationalStore --target-resource-id {restore_disk_id} \ + --recovery-point-id b7e6f082-b310-11eb-8f55-9cfce85d4fae +``` +##### Validate restore request ##### +``` +az dataprotection backup-instance validate-for-restore --name "testInstance1" --resource-group "000pikumar" \ + --vault-name "PratikPrivatePreviewVault1" --restore-request-object restore_request.json +``` +##### Trigger restore ##### +``` +az dataprotection backup-instance restore trigger -g sarath-rg --vault-name sarath-vault \ + --backup-instance-name {backup_instance_name} --restore=request-object restore_request.json +``` +#### dataprotection backup-vault #### +##### Create ##### +``` +az dataprotection backup-vault create --type "None" --location "WestUS" \ + --storage-settings type="LocallyRedundant" datastore-type="VaultStore" --tags key1="val1" \ + --resource-group "SampleResourceGroup" --vault-name "swaggerExample" +``` +##### Show ##### +``` +az dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name "swaggerExample" +``` +##### Update ##### +``` +az dataprotection backup-vault update --tags newKey="newVal" --resource-group "SampleResourceGroup" \ + --vault-name "swaggerExample" +``` +##### Delete ##### +``` +az dataprotection backup-vault delete --resource-group "SampleResourceGroup" --vault-name "swaggerExample" +``` +#### dataprotection backup-policy #### +##### Show ##### +``` +az dataprotection backup-policy show --name "OSSDBPolicy" --resource-group "000pikumar" \ + --vault-name "PrivatePreviewVault" +``` +##### List ##### +``` +az dataprotection backup-policy list --resource-group "000pikumar" --vault-name "PrivatePreviewVault" +``` +##### Delete ##### +``` +az dataprotection backup-policy delete --name "OSSDBPolicy" --resource-group "000pikumar" \ + --vault-name "PrivatePreviewVault" +``` +#### dataprotection backup-instance #### +##### Show ##### +``` +az dataprotection backup-instance show --name "testInstance1" --resource-group "000pikumar" \ + --vault-name "PratikPrivatePreviewVault1" +``` +##### List ##### +``` +az dataprotection backup-instance list --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +``` +##### Adhoc-backup ##### +``` +az dataprotection backup-instance adhoc-backup --name "testInstance1" --rule-name "BackupWeekly" \ + --retention-tag-override "yearly" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +``` + +##### Delete ##### +``` +az dataprotection backup-instance delete --name "testInstance1" --resource-group "000pikumar" \ + --vault-name "PratikPrivatePreviewVault1" +``` +#### dataprotection recovery-point #### +##### List ##### +``` +az dataprotection recovery-point list --backup-instance-name "testInstance1" --resource-group "000pikumar" \ + --vault-name "PratikPrivatePreviewVault1" +``` +##### Show ##### +``` +az dataprotection recovery-point show --backup-instance-name "testInstance1" \ + --recovery-point-id "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25" --resource-group "000pikumar" \ + --vault-name "PratikPrivatePreviewVault1" +``` +#### dataprotection job #### +##### List ##### +``` +az dataprotection job list --resource-group "BugBash1" --vault-name "BugBashVaultForCCYv11" +``` +##### Show ##### +``` +az dataprotection job show --job-id "3c60cb49-63e8-4b21-b9bd-26277b3fdfae" --resource-group "BugBash1" \ + --vault-name "BugBashVaultForCCYv11" +``` +#### dataprotection restorable-time-range #### +##### Find ##### +``` +az dataprotection restorable-time-range find --backup-instances "zblobbackuptestsa58" \ + --end-time "2021-02-24T00:35:17.6829685Z" --source-data-store-type "OperationalStore" \ + --start-time "2020-10-17T23:28:17.6829685Z" --resource-group "Blob-Backup" --vault-name "ZBlobBackupVaultBVTD3" +``` \ No newline at end of file diff --git a/src/dataprotection/azext_dataprotection/__init__.py b/src/dataprotection/azext_dataprotection/__init__.py new file mode 100644 index 00000000000..804e3fcbf2e --- /dev/null +++ b/src/dataprotection/azext_dataprotection/__init__.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_dataprotection.generated._help import helps # pylint: disable=unused-import +try: + from azext_dataprotection.manual._help import helps # pylint: disable=reimported +except ImportError as e: + if e.name.endswith('manual._help'): + pass + else: + raise e + + +class DataProtectionClientCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_dataprotection.generated._client_factory import cf_dataprotection_cl + dataprotection_custom = CliCommandType( + operations_tmpl='azext_dataprotection.custom#{}', + client_factory=cf_dataprotection_cl) + parent = super(DataProtectionClientCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=dataprotection_custom) + + def load_command_table(self, args): + from azext_dataprotection.generated.commands import load_command_table + load_command_table(self, args) + try: + from azext_dataprotection.manual.commands import load_command_table as load_command_table_manual + load_command_table_manual(self, args) + except ImportError as e: + if e.name.endswith('manual.commands'): + pass + else: + raise e + return self.command_table + + def load_arguments(self, command): + from azext_dataprotection.generated._params import load_arguments + load_arguments(self, command) + try: + from azext_dataprotection.manual._params import load_arguments as load_arguments_manual + load_arguments_manual(self, command) + except ImportError as e: + if e.name.endswith('manual._params'): + pass + else: + raise e + + +COMMAND_LOADER_CLS = DataProtectionClientCommandsLoader diff --git a/src/dataprotection/azext_dataprotection/action.py b/src/dataprotection/azext_dataprotection/action.py new file mode 100644 index 00000000000..9b3d0a8a78c --- /dev/null +++ b/src/dataprotection/azext_dataprotection/action.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.action import * # noqa: F403 +try: + from .manual.action import * # noqa: F403 +except ImportError as e: + if e.name.endswith('manual.action'): + pass + else: + raise e diff --git a/src/dataprotection/azext_dataprotection/azext_metadata.json b/src/dataprotection/azext_dataprotection/azext_metadata.json new file mode 100644 index 00000000000..cfc30c747c7 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0" +} \ No newline at end of file diff --git a/src/dataprotection/azext_dataprotection/custom.py b/src/dataprotection/azext_dataprotection/custom.py new file mode 100644 index 00000000000..885447229d6 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/custom.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.custom import * # noqa: F403 +try: + from .manual.custom import * # noqa: F403 +except ImportError as e: + if e.name.endswith('manual.custom'): + pass + else: + raise e diff --git a/src/dataprotection/azext_dataprotection/generated/__init__.py b/src/dataprotection/azext_dataprotection/generated/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/generated/_client_factory.py b/src/dataprotection/azext_dataprotection/generated/_client_factory.py new file mode 100644 index 00000000000..b383230f07f --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/_client_factory.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +def cf_dataprotection_cl(cli_ctx, *_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azext_dataprotection.vendored_sdks.dataprotection import DataProtectionClient + return get_mgmt_service_client(cli_ctx, + DataProtectionClient) + + +def cf_backup_vault(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).backup_vaults + + +def cf_backup_policy(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).backup_policies + + +def cf_backup_instance(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).backup_instances + + +def cf_recovery_point(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).recovery_points + + +def cf_job(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).jobs + + +def cf_restorable_time_range(cli_ctx, *_): + return cf_dataprotection_cl(cli_ctx).restorable_time_ranges diff --git a/src/dataprotection/azext_dataprotection/generated/_help.py b/src/dataprotection/azext_dataprotection/generated/_help.py new file mode 100644 index 00000000000..70ef4d3373f --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/_help.py @@ -0,0 +1,465 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.help_files import helps + + +helps['dataprotection'] = ''' + type: group + short-summary: Manage Data Protection +''' + +helps['dataprotection backup-vault'] = """ + type: group + short-summary: Manage backup vault with dataprotection +""" + +helps['dataprotection backup-vault show'] = """ + type: command + short-summary: "Returns a resource belonging to a resource group." + examples: + - name: Get BackupVault + text: |- + az dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name \ +"swaggerExample" + - name: Get BackupVault With MSI + text: |- + az dataprotection backup-vault show --resource-group "SampleResourceGroup" --vault-name \ +"swaggerExample" +""" + +helps['dataprotection backup-vault create'] = """ + type: command + short-summary: "Create a BackupVault resource belonging to a resource group." + parameters: + - name: --storage-settings + short-summary: "Storage Settings" + long-summary: | + Usage: --storage-settings datastore-type=XX type=XX + + datastore-type: Gets or sets the type of the datastore. + type: Gets or sets the type. + + Multiple actions can be specified by using more than one --storage-settings argument. + examples: + - name: Create BackupVault + text: |- + az dataprotection backup-vault create --type "None" --location "WestUS" --storage-settings \ +type="LocallyRedundant" datastore-type="VaultStore" --tags key1="val1" --resource-group "SampleResourceGroup" \ +--vault-name "swaggerExample" + - name: Create BackupVault With MSI + text: |- + az dataprotection backup-vault create --type "systemAssigned" --location "WestUS" --storage-settings \ +type="LocallyRedundant" datastore-type="VaultStore" --tags key1="val1" --resource-group "SampleResourceGroup" \ +--vault-name "swaggerExample" +""" + +helps['dataprotection backup-vault update'] = """ + type: command + short-summary: "Updates a BackupVault resource belonging to a resource group. For example, updating tags for a \ +resource." + examples: + - name: Patch BackupVault + text: |- + az dataprotection backup-vault update --tags newKey="newVal" --resource-group "SampleResourceGroup" \ +--vault-name "swaggerExample" +""" + +helps['dataprotection backup-vault delete'] = """ + type: command + short-summary: "Deletes a BackupVault resource from the resource group." + examples: + - name: Delete BackupVault + text: |- + az dataprotection backup-vault delete --resource-group "SampleResourceGroup" --vault-name \ +"swaggerExample" +""" + +helps['dataprotection backup-vault wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the dataprotection backup-vault is met. + examples: + - name: Pause executing next line of CLI script until the dataprotection backup-vault is successfully created. + text: |- + az dataprotection backup-vault wait --resource-group "SampleResourceGroup" --vault-name \ +"swaggerExample" --created + - name: Pause executing next line of CLI script until the dataprotection backup-vault is successfully updated. + text: |- + az dataprotection backup-vault wait --resource-group "SampleResourceGroup" --vault-name \ +"swaggerExample" --updated +""" + +helps['dataprotection backup-policy'] = """ + type: group + short-summary: Manage backup policy with dataprotection +""" + +helps['dataprotection backup-policy list'] = """ + type: command + short-summary: "Returns list of backup policies belonging to a backup vault." + examples: + - name: List BackupPolicy + text: |- + az dataprotection backup-policy list --resource-group "000pikumar" --vault-name "PrivatePreviewVault" +""" + +helps['dataprotection backup-policy show'] = """ + type: command + short-summary: "Gets a backup policy belonging to a backup vault." + examples: + - name: Get BackupPolicy + text: |- + az dataprotection backup-policy show --name "OSSDBPolicy" --resource-group "000pikumar" --vault-name \ +"PrivatePreviewVault" +""" + +helps['dataprotection backup-policy create'] = """ + type: command + short-summary: "Create a backup policy belonging to a backup vault." + parameters: + - name: --backup-policy + short-summary: "Rule based backup policy" + long-summary: | + Usage: --backup-policy policy-rules=XX datasource-types=XX object-type=XX + + policy-rules: Required. Policy rule dictionary that contains rules for each backuptype i.e \ +Full/Incremental/Logs etc + datasource-types: Required. Type of datasource for the backup management + examples: + - name: CreateOrUpdate BackupPolicy + text: |- + az dataprotection backup-policy create --name "OSSDBPolicy" --properties "{\\"datasourceTypes\\":[\\"Oss\ +DB\\"],\\"objectType\\":\\"BackupPolicy\\",\\"policyRules\\":[{\\"name\\":\\"BackupWeekly\\",\\"backupParameters\\":{\\\ +"backupType\\":\\"Full\\",\\"objectType\\":\\"AzureBackupParams\\"},\\"dataStore\\":{\\"dataStoreType\\":\\"VaultStore\ +\\",\\"objectType\\":\\"DataStoreInfoBase\\"},\\"objectType\\":\\"AzureBackupRule\\",\\"trigger\\":{\\"objectType\\":\\\ +"ScheduleBasedTriggerContext\\",\\"schedule\\":{\\"repeatingTimeIntervals\\":[\\"R/2019-11-20T08:00:00-08:00/P1W\\"]},\ +\\"taggingCriteria\\":[{\\"isDefault\\":true,\\"tagInfo\\":{\\"tagName\\":\\"Default\\"},\\"taggingPriority\\":99},{\\"\ +criteria\\":[{\\"daysOfTheWeek\\":[\\"Sunday\\"],\\"objectType\\":\\"ScheduleBasedBackupCriteria\\",\\"scheduleTimes\\"\ +:[\\"2019-03-01T13:00:00Z\\"]}],\\"isDefault\\":false,\\"tagInfo\\":{\\"tagName\\":\\"Weekly\\"},\\"taggingPriority\\":\ +20}]}},{\\"name\\":\\"Default\\",\\"isDefault\\":true,\\"lifecycles\\":[{\\"deleteAfter\\":{\\"duration\\":\\"P1W\\",\\\ +"objectType\\":\\"AbsoluteDeleteOption\\"},\\"sourceDataStore\\":{\\"dataStoreType\\":\\"VaultStore\\",\\"objectType\\"\ +:\\"DataStoreInfoBase\\"}}],\\"objectType\\":\\"AzureRetentionRule\\"},{\\"name\\":\\"Weekly\\",\\"isDefault\\":false,\ +\\"lifecycles\\":[{\\"deleteAfter\\":{\\"duration\\":\\"P12W\\",\\"objectType\\":\\"AbsoluteDeleteOption\\"},\\"sourceD\ +ataStore\\":{\\"dataStoreType\\":\\"VaultStore\\",\\"objectType\\":\\"DataStoreInfoBase\\"}}],\\"objectType\\":\\"Azure\ +RetentionRule\\"}]}" --resource-group "000pikumar" --vault-name "PrivatePreviewVault" +""" + +helps['dataprotection backup-policy delete'] = """ + type: command + short-summary: "Deletes a backup policy belonging to a backup vault." + examples: + - name: Delete BackupPolicy + text: |- + az dataprotection backup-policy delete --name "OSSDBPolicy" --resource-group "000pikumar" --vault-name \ +"PrivatePreviewVault" +""" + +helps['dataprotection backup-instance'] = """ + type: group + short-summary: Manage backup instance with dataprotection +""" + +helps['dataprotection backup-instance list'] = """ + type: command + short-summary: "Gets a backup instances belonging to a backup vault." + examples: + - name: List BackupInstances in a Vault + text: |- + az dataprotection backup-instance list --resource-group "000pikumar" --vault-name \ +"PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance show'] = """ + type: command + short-summary: "Gets a backup instance with name in a backup vault." + examples: + - name: Get BackupInstance + text: |- + az dataprotection backup-instance show --name "testInstance1" --resource-group "000pikumar" \ +--vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance create'] = """ + type: command + short-summary: "Create a backup instance in a backup vault." + parameters: + - name: --data-source-info + short-summary: "Gets or sets the data source information." + long-summary: | + Usage: --data-source-info datasource-type=XX object-type=XX resource-id=XX resource-location=XX \ +resource-name=XX resource-type=XX resource-uri=XX + + datasource-type: DatasourceType of the resource. + object-type: Type of Datasource object, used to initialize the right inherited type + resource-id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure \ +resources, this will be the ID created by backup service via Fabric/Vault. + resource-location: Location of datasource. + resource-name: Unique identifier of the resource in the context of parent. + resource-type: Resource Type of Datasource. + resource-uri: Uri of the resource. + - name: --data-source-set-info + short-summary: "Gets or sets the data source set information." + long-summary: | + Usage: --data-source-set-info datasource-type=XX object-type=XX resource-id=XX resource-location=XX \ +resource-name=XX resource-type=XX resource-uri=XX + + datasource-type: DatasourceType of the resource. + object-type: Type of Datasource object, used to initialize the right inherited type + resource-id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure \ +resources, this will be the ID created by backup service via Fabric/Vault. + resource-location: Location of datasource. + resource-name: Unique identifier of the resource in the context of parent. + resource-type: Resource Type of Datasource. + resource-uri: Uri of the resource. + - name: --policy-parameters + short-summary: "Policy parameters for the backup instance" + long-summary: | + Usage: --policy-parameters data-store-parameters-list=XX + + data-store-parameters-list: Gets or sets the DataStore Parameters + examples: + - name: Create BackupInstance + text: |- + az dataprotection backup-instance create --name "testInstance1" --data-source-info \ +datasource-type="OssDB" object-type="Datasource" resource-id="/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resou\ +rceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb" \ +resource-location="" resource-name="testdb" resource-type="Microsoft.DBforPostgreSQL/servers/databases" \ +resource-uri="" --data-source-set-info datasource-type="OssDB" object-type="DatasourceSet" \ +resource-id="/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBfor\ +PostgreSQL/servers/viveksipgtest" resource-location="" resource-name="viveksipgtest" resource-type="Microsoft.DBforPost\ +greSQL/servers" resource-uri="" --friendly-name "harshitbi2" --object-type "BackupInstance" --policy-id \ +"/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backu\ +pvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1" --policy-parameters data-store-parameters-list={"dataS\ +toreType":"OperationalStore","objectType":"AzureOperationalStoreParameters","resourceGroupId":"/subscriptions/f75d8d8b-\ +6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"} --resource-group "000pikumar" --vault-name \ +"PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance delete'] = """ + type: command + short-summary: "Delete a backup instance in a backup vault." + examples: + - name: Delete BackupInstance + text: |- + az dataprotection backup-instance delete --name "testInstance1" --resource-group "000pikumar" \ +--vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance adhoc-backup'] = """ + type: command + short-summary: "Trigger adhoc backup." + examples: + - name: Trigger Adhoc Backup + text: |- + az dataprotection backup-instance adhoc-backup --name "testInstance1" --rule-name "BackupWeekly" \ +--retention-tag-override "yearly" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance restore'] = """ + type: group + short-summary: Manage backup instance with dataprotection sub group restore +""" + +helps['dataprotection backup-instance restore trigger'] = """ + type: command + short-summary: "Triggers restore for a BackupInstance." + examples: + - name: Trigger Restore + text: |- + az dataprotection backup-instance restore trigger --name "testInstance1" --restore-request-object \ +"{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recoveryPointId\\":\\"hardcodedRP\\",\\"restore\ +TargetInfo\\":{\\"datasourceInfo\\":{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\":\\"Datasource\\",\\"resourceID\\\ +":\\"/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreS\ +QL/servers/viveksipgtest/databases/testdb\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"testdb\\",\\"resourceT\ +ype\\":\\"Microsoft.DBforPostgreSQL/servers/databases\\",\\"resourceUri\\":\\"\\"},\\"datasourceSetInfo\\":{\\"datasour\ +ceType\\":\\"OssDB\\",\\"objectType\\":\\"DatasourceSet\\",\\"resourceID\\":\\"/subscriptions/f75d8d8b-6735-4697-82e1-1\ +a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest\\",\\"resourceLocati\ +on\\":\\"\\",\\"resourceName\\":\\"viveksipgtest\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers\\",\\"resou\ +rceUri\\":\\"\\"},\\"objectType\\":\\"RestoreTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\\ +":\\"southeastasia\\"},\\"sourceDataStoreType\\":\\"VaultStore\\"}" --resource-group "000pikumar" --vault-name \ +"PratikPrivatePreviewVault1" + - name: Trigger Restore As Files + text: |- + az dataprotection backup-instance restore trigger --name "testInstance1" --restore-request-object \ +"{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recoveryPointId\\":\\"hardcodedRP\\",\\"restore\ +TargetInfo\\":{\\"objectType\\":\\"RestoreFilesTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\ +\\":\\"southeastasia\\",\\"targetDetails\\":{\\"filePrefix\\":\\"restoredblob\\",\\"restoreTargetLocationType\\":\\"Azu\ +reBlobs\\",\\"url\\":\\"https://teststorage.blob.core.windows.net/restoretest\\"}},\\"sourceDataStoreType\\":\\"VaultSt\ +ore\\"}" --resource-group "000pikumar" --vault-name "PrivatePreviewVault1" + - name: Trigger Restore With Rehydration + text: |- + az dataprotection backup-instance restore trigger --name "testInstance1" --restore-request-object \ +"{\\"objectType\\":\\"AzureBackupRestoreWithRehydrationRequest\\",\\"recoveryPointId\\":\\"hardcodedRP\\",\\"rehydratio\ +nPriority\\":\\"High\\",\\"rehydrationRetentionDuration\\":\\"7D\\",\\"restoreTargetInfo\\":{\\"datasourceInfo\\":{\\"d\ +atasourceType\\":\\"OssDB\\",\\"objectType\\":\\"Datasource\\",\\"resourceID\\":\\"/subscriptions/f75d8d8b-6735-4697-82\ +e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb\ +\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"testdb\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/serve\ +rs/databases\\",\\"resourceUri\\":\\"\\"},\\"datasourceSetInfo\\":{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\":\\\ +"DatasourceSet\\",\\"resourceID\\":\\"/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/\ +providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"viveks\ +ipgtest\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers\\",\\"resourceUri\\":\\"\\"},\\"objectType\\":\\"Res\ +toreTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\":\\"southeastasia\\"},\\"sourceDataStore\ +Type\\":\\"VaultStore\\"}" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance validate-for-backup'] = """ + type: command + short-summary: "Validate whether adhoc backup will be successful or not." + parameters: + - name: --data-source-info + short-summary: "Gets or sets the data source information." + long-summary: | + Usage: --data-source-info datasource-type=XX object-type=XX resource-id=XX resource-location=XX \ +resource-name=XX resource-type=XX resource-uri=XX + + datasource-type: DatasourceType of the resource. + object-type: Type of Datasource object, used to initialize the right inherited type + resource-id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure \ +resources, this will be the ID created by backup service via Fabric/Vault. + resource-location: Location of datasource. + resource-name: Unique identifier of the resource in the context of parent. + resource-type: Resource Type of Datasource. + resource-uri: Uri of the resource. + - name: --data-source-set-info + short-summary: "Gets or sets the data source set information." + long-summary: | + Usage: --data-source-set-info datasource-type=XX object-type=XX resource-id=XX resource-location=XX \ +resource-name=XX resource-type=XX resource-uri=XX + + datasource-type: DatasourceType of the resource. + object-type: Type of Datasource object, used to initialize the right inherited type + resource-id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure \ +resources, this will be the ID created by backup service via Fabric/Vault. + resource-location: Location of datasource. + resource-name: Unique identifier of the resource in the context of parent. + resource-type: Resource Type of Datasource. + resource-uri: Uri of the resource. + - name: --policy-parameters + short-summary: "Policy parameters for the backup instance" + long-summary: | + Usage: --policy-parameters data-store-parameters-list=XX + + data-store-parameters-list: Gets or sets the DataStore Parameters + examples: + - name: Validate For Backup + text: |- + az dataprotection backup-instance validate-for-backup --data-source-info datasource-type="OssDB" \ +object-type="Datasource" resource-id="/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/\ +providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb" resource-location="" \ +resource-name="testdb" resource-type="Microsoft.DBforPostgreSQL/servers/databases" resource-uri="" \ +--data-source-set-info datasource-type="OssDB" object-type="DatasourceSet" resource-id="/subscriptions/f75d8d8b-6735-46\ +97-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest" \ +resource-location="" resource-name="viveksipgtest" resource-type="Microsoft.DBforPostgreSQL/servers" resource-uri="" \ +--friendly-name "harshitbi2" --object-type "BackupInstance" --policy-id "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a\ +2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolici\ +es/PratikPolicy1" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance validate-for-restore'] = """ + type: command + short-summary: "Validates if Restore can be triggered for a DataSource." + examples: + - name: Validate Restore + text: |- + az dataprotection backup-instance validate-for-restore --name "testInstance1" --restore-request-object \ +"{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recoveryPointId\\":\\"hardcodedRP\\",\\"restore\ +TargetInfo\\":{\\"datasourceInfo\\":{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\":\\"Datasource\\",\\"resourceID\\\ +":\\"/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreS\ +QL/servers/viveksipgtest/databases/testdb\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"testdb\\",\\"resourceT\ +ype\\":\\"Microsoft.DBforPostgreSQL/servers/databases\\",\\"resourceUri\\":\\"\\"},\\"datasourceSetInfo\\":{\\"datasour\ +ceType\\":\\"OssDB\\",\\"objectType\\":\\"DatasourceSet\\",\\"resourceID\\":\\"/subscriptions/f75d8d8b-6735-4697-82e1-1\ +a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest\\",\\"resourceLocati\ +on\\":\\"\\",\\"resourceName\\":\\"viveksipgtest\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers\\",\\"resou\ +rceUri\\":\\"\\"},\\"objectType\\":\\"RestoreTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\\ +":\\"southeastasia\\"},\\"sourceDataStoreType\\":\\"VaultStore\\"}" --resource-group "000pikumar" --vault-name \ +"PratikPrivatePreviewVault1" +""" + +helps['dataprotection backup-instance wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the dataprotection backup-instance is met. + examples: + - name: Pause executing next line of CLI script until the dataprotection backup-instance is successfully \ +created. + text: |- + az dataprotection backup-instance wait --name "testInstance1" --resource-group "000pikumar" \ +--vault-name "PratikPrivatePreviewVault1" --created + - name: Pause executing next line of CLI script until the dataprotection backup-instance is successfully \ +deleted. + text: |- + az dataprotection backup-instance wait --name "testInstance1" --resource-group "000pikumar" \ +--vault-name "PratikPrivatePreviewVault1" --deleted +""" + +helps['dataprotection recovery-point'] = """ + type: group + short-summary: Manage recovery point with dataprotection +""" + +helps['dataprotection recovery-point list'] = """ + type: command + short-summary: "Returns a list of Recovery Points for a DataSource in a vault." + examples: + - name: List Recovery Points in a Vault + text: |- + az dataprotection recovery-point list --backup-instance-name "testInstance1" --resource-group \ +"000pikumar" --vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection recovery-point show'] = """ + type: command + short-summary: "Gets a Recovery Point using recoveryPointId for a Datasource." + examples: + - name: Get Recovery Point + text: |- + az dataprotection recovery-point show --backup-instance-name "testInstance1" --recovery-point-id \ +"7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25" --resource-group "000pikumar" --vault-name "PratikPrivatePreviewVault1" +""" + +helps['dataprotection job'] = """ + type: group + short-summary: Manage job with dataprotection +""" + +helps['dataprotection job list'] = """ + type: command + short-summary: "Returns list of jobs belonging to a backup vault." + examples: + - name: Get Jobs + text: |- + az dataprotection job list --resource-group "BugBash1" --vault-name "BugBashVaultForCCYv11" +""" + +helps['dataprotection job show'] = """ + type: command + short-summary: "Gets a job with id in a backup vault." + examples: + - name: Get Job + text: |- + az dataprotection job show --job-id "3c60cb49-63e8-4b21-b9bd-26277b3fdfae" --resource-group "BugBash1" \ +--vault-name "BugBashVaultForCCYv11" +""" + +helps['dataprotection restorable-time-range'] = """ + type: group + short-summary: Manage restorable time range with dataprotection +""" + +helps['dataprotection restorable-time-range find'] = """ + type: command + short-summary: "." + examples: + - name: Find Restorable Time Ranges + text: |- + az dataprotection restorable-time-range find --backup-instances "zblobbackuptestsa58" --end-time \ +"2021-02-24T00:35:17.6829685Z" --source-data-store-type "OperationalStore" --start-time "2020-10-17T23:28:17.6829685Z" \ +--resource-group "Blob-Backup" --vault-name "ZBlobBackupVaultBVTD3" +""" diff --git a/src/dataprotection/azext_dataprotection/generated/_params.py b/src/dataprotection/azext_dataprotection/generated/_params.py new file mode 100644 index 00000000000..72114b44063 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/_params.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + tags_type, + get_enum_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group, + validate_file_or_dict +) +from azext_dataprotection.action import ( + AddStorageSettings, + AddBackupPolicy, + AddDataSourceInfo, + AddDataSourceSetInfo, + AddPolicyParameters +) + + +def load_arguments(self, _): + + with self.argument_context('dataprotection backup-vault show') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dataprotection backup-vault create') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('e_tag', type=str, help='Optional ETag.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('type_', options_list=['--type'], type=str, help='The identityType which can be either ' + 'SystemAssigned or None', arg_group='Identity') + c.argument('storage_settings', action=AddStorageSettings, nargs='+', help='Storage Settings') + + with self.argument_context('dataprotection backup-vault update') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('tags', tags_type) + c.argument('type_', options_list=['--type'], type=str, help='The identityType which can be either ' + 'SystemAssigned or None', arg_group='Identity') + + with self.argument_context('dataprotection backup-vault delete') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dataprotection backup-vault wait') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dataprotection backup-policy list') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dataprotection backup-policy show') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_policy_name', options_list=['--name', '-n', '--backup-policy-name'], type=str, help='Backup ' + 'policy name', id_part='child_name_1') + + with self.argument_context('dataprotection backup-policy create') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_policy_name', options_list=['--name', '-n', '--backup-policy-name'], type=str, help='Backup ' + 'policy name') + c.argument('backup_policy', action=AddBackupPolicy, nargs='+', help='Rule based backup policy', + arg_group='Properties') + + with self.argument_context('dataprotection backup-policy delete') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_policy_name', options_list=['--name', '-n', '--backup-policy-name'], type=str, help='Backup ' + 'policy name', id_part='child_name_1') + + with self.argument_context('dataprotection backup-instance list') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dataprotection backup-instance show') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + + with self.argument_context('dataprotection backup-instance create') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance') + c.argument('friendly_name', type=str, help='Gets or sets the Backup Instance friendly name.') + c.argument('data_source_info', action=AddDataSourceInfo, nargs='+', help='Gets or sets the data source ' + 'information.') + c.argument('data_source_set_info', action=AddDataSourceSetInfo, nargs='+', help='Gets or sets the data source ' + 'set information.') + c.argument('object_type', type=str, help='') + c.argument('policy_id', type=str, help='', arg_group='Policy Info') + c.argument('policy_parameters', action=AddPolicyParameters, nargs='+', help='Policy parameters for the backup ' + 'instance', arg_group='Policy Info') + + with self.argument_context('dataprotection backup-instance delete') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + + with self.argument_context('dataprotection backup-instance adhoc-backup') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + c.argument('rule_name', type=str, help='Specify backup policy rule name.', arg_group='Backup Rule Options') + c.argument('retention_tag_override', type=str, help='Specify retention override tag.', arg_group='Backup Rule ' + 'Options Trigger Option') + + with self.argument_context('dataprotection backup-instance restore trigger') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + c.argument('parameters', options_list=['--restore-request-object'], type=validate_file_or_dict, help='Request ' + 'body for operation Expected value: json-string/@json-file.') + + with self.argument_context('dataprotection backup-instance validate-for-backup') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('friendly_name', type=str, help='Gets or sets the Backup Instance friendly name.', + arg_group='Backup Instance') + c.argument('data_source_info', action=AddDataSourceInfo, nargs='+', help='Gets or sets the data source ' + 'information.', arg_group='Backup Instance') + c.argument('data_source_set_info', action=AddDataSourceSetInfo, nargs='+', help='Gets or sets the data source ' + 'set information.', arg_group='Backup Instance') + c.argument('object_type', type=str, help='', arg_group='Backup Instance') + c.argument('policy_id', type=str, help='', arg_group='Backup Instance Policy Info') + c.argument('policy_parameters', action=AddPolicyParameters, nargs='+', help='Policy parameters for the backup ' + 'instance', arg_group='Backup Instance Policy Info') + + with self.argument_context('dataprotection backup-instance validate-for-restore') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + c.argument('restore_request_object', type=validate_file_or_dict, help='Gets or sets the restore request ' + 'object. Expected value: json-string/@json-file.') + + with self.argument_context('dataprotection backup-instance wait') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', options_list=['--name', '-n', '--backup-instance-name'], type=str, + help='The name of the backup instance', id_part='child_name_1') + + with self.argument_context('dataprotection recovery-point list') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', type=str, help='The name of the backup instance') + c.argument('filter_', options_list=['--filter'], type=str, help='OData filter options.') + c.argument('skip_token', type=str, help='skipToken Filter.') + + with self.argument_context('dataprotection recovery-point show') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instance_name', type=str, help='The name of the backup instance', id_part='child_name_1') + c.argument('recovery_point_id', type=str, help='Recovery point id.', id_part='child_name_2') + + with self.argument_context('dataprotection job list') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('vault_name', type=str, help='The name of the backup vault.') + + with self.argument_context('dataprotection job show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('job_id', type=str, help='The Job ID. This is a GUID-formatted string (e.g. ' + '00000000-0000-0000-0000-000000000000).', id_part='child_name_1') + + with self.argument_context('dataprotection restorable-time-range find') as c: + c.argument('vault_name', type=str, help='The name of the backup vault.', id_part='name') + c.argument('resource_group_name', resource_group_name_type) + c.argument('backup_instances', type=str, help='Backup instance name.', id_part='child_name_1') + c.argument('source_data_store_type', arg_type=get_enum_type(['OperationalStore', 'VaultStore', + 'ArchiveStore']), help='Specify the ' + 'source data store.') + c.argument('start_time', type=str, help='Start time for the List Restore Ranges request') + c.argument('end_time', type=str, help='End time for the List Restore Ranges request') diff --git a/src/dataprotection/azext_dataprotection/generated/_validators.py b/src/dataprotection/azext_dataprotection/generated/_validators.py new file mode 100644 index 00000000000..b33a44c1ebf --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/_validators.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- diff --git a/src/dataprotection/azext_dataprotection/generated/action.py b/src/dataprotection/azext_dataprotection/generated/action.py new file mode 100644 index 00000000000..bb36da29342 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/action.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access + +import argparse +from collections import defaultdict +from knack.util import CLIError + + +class AddStorageSettings(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddStorageSettings, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'datastore-type': + d['datastore_type'] = v[0] + elif kl == 'type': + d['type'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter storage_settings. All possible keys are: ' + 'datastore-type, type'.format(k)) + return d + + +class AddBackupPolicy(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.backup_policy = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'policy-rules': + d['policy_rules'] = v + elif kl == 'datasource-types': + d['datasource_types'] = v + else: + raise CLIError('Unsupported Key {} is provided for parameter backup_policy. All possible keys are: ' + 'policy-rules, datasource-types'.format(k)) + d['object_type'] = 'BackupPolicy' + return d + + +class AddDataSourceInfo(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.data_source_info = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'datasource-type': + d['datasource_type'] = v[0] + elif kl == 'object-type': + d['object_type'] = v[0] + elif kl == 'resource-id': + d['resource_id'] = v[0] + elif kl == 'resource-location': + d['resource_location'] = v[0] + elif kl == 'resource-name': + d['resource_name'] = v[0] + elif kl == 'resource-type': + d['resource_type'] = v[0] + elif kl == 'resource-uri': + d['resource_uri'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter data_source_info. All possible keys are: ' + 'datasource-type, object-type, resource-id, resource-location, resource-name, ' + 'resource-type, resource-uri'.format(k)) + return d + + +class AddDataSourceSetInfo(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.data_source_set_info = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'datasource-type': + d['datasource_type'] = v[0] + elif kl == 'object-type': + d['object_type'] = v[0] + elif kl == 'resource-id': + d['resource_id'] = v[0] + elif kl == 'resource-location': + d['resource_location'] = v[0] + elif kl == 'resource-name': + d['resource_name'] = v[0] + elif kl == 'resource-type': + d['resource_type'] = v[0] + elif kl == 'resource-uri': + d['resource_uri'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter data_source_set_info. All possible keys ' + 'are: datasource-type, object-type, resource-id, resource-location, resource-name, ' + 'resource-type, resource-uri'.format(k)) + return d + + +class AddPolicyParameters(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.policy_parameters = action + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'data-store-parameters-list': + d['data_store_parameters_list'] = v + else: + raise CLIError('Unsupported Key {} is provided for parameter policy_parameters. All possible keys are: ' + 'data-store-parameters-list'.format(k)) + return d diff --git a/src/dataprotection/azext_dataprotection/generated/commands.py b/src/dataprotection/azext_dataprotection/generated/commands.py new file mode 100644 index 00000000000..a5cdf094268 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/commands.py @@ -0,0 +1,116 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals +# pylint: disable=bad-continuation +# pylint: disable=line-too-long + +from azure.cli.core.commands import CliCommandType +from azext_dataprotection.generated._client_factory import ( + cf_backup_vault, + cf_backup_policy, + cf_backup_instance, + cf_recovery_point, + cf_job, + cf_restorable_time_range, +) + + +dataprotection_backup_vault = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._backup_vaults_operations#BackupVaultsOperations.{}', + client_factory=cf_backup_vault, +) + + +dataprotection_backup_policy = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._backup_policies_operations#BackupPoliciesOperations.{}', + client_factory=cf_backup_policy, +) + + +dataprotection_backup_instance = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._backup_instances_operations#BackupInstancesOperations.{}', + client_factory=cf_backup_instance, +) + + +dataprotection_recovery_point = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._recovery_points_operations#RecoveryPointsOperations.{}', + client_factory=cf_recovery_point, +) + + +dataprotection_job = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._jobs_operations#JobsOperations.{}', + client_factory=cf_job, +) + + +dataprotection_restorable_time_range = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._restorable_time_ranges_operations#RestorableTimeRangesOperations.{}', + client_factory=cf_restorable_time_range, +) + + +def load_command_table(self, _): + + with self.command_group( + 'dataprotection backup-vault', dataprotection_backup_vault, client_factory=cf_backup_vault + ) as g: + g.custom_show_command('show', 'dataprotection_backup_vault_show') + g.custom_command('create', 'dataprotection_backup_vault_create', supports_no_wait=True) + g.custom_command('update', 'dataprotection_backup_vault_update', supports_no_wait=True) + g.custom_command('delete', 'dataprotection_backup_vault_delete', confirmation=True) + g.custom_wait_command('wait', 'dataprotection_backup_vault_show') + + with self.command_group( + 'dataprotection backup-policy', dataprotection_backup_policy, client_factory=cf_backup_policy + ) as g: + g.custom_command('list', 'dataprotection_backup_policy_list') + g.custom_show_command('show', 'dataprotection_backup_policy_show') + g.custom_command('create', 'dataprotection_backup_policy_create') + g.custom_command('delete', 'dataprotection_backup_policy_delete', confirmation=True) + + with self.command_group( + 'dataprotection backup-instance', dataprotection_backup_instance, client_factory=cf_backup_instance + ) as g: + g.custom_command('list', 'dataprotection_backup_instance_list') + g.custom_show_command('show', 'dataprotection_backup_instance_show') + g.custom_command('create', 'dataprotection_backup_instance_create', supports_no_wait=True) + g.custom_command('delete', 'dataprotection_backup_instance_delete', supports_no_wait=True, confirmation=True) + g.custom_command('adhoc-backup', 'dataprotection_backup_instance_adhoc_backup', supports_no_wait=True) + g.custom_command('restore trigger', 'dataprotection_backup_instance_restore_trigger', supports_no_wait=True) + g.custom_command( + 'validate-for-backup', 'dataprotection_backup_instance_validate_for_backup', supports_no_wait=True + ) + g.custom_command( + 'validate-for-restore', 'dataprotection_backup_instance_validate_for_restore', supports_no_wait=True + ) + g.custom_wait_command('wait', 'dataprotection_backup_instance_show') + + with self.command_group( + 'dataprotection recovery-point', dataprotection_recovery_point, client_factory=cf_recovery_point + ) as g: + g.custom_command('list', 'dataprotection_recovery_point_list') + g.custom_show_command('show', 'dataprotection_recovery_point_show') + + with self.command_group('dataprotection job', dataprotection_job, client_factory=cf_job) as g: + g.custom_command('list', 'dataprotection_job_list') + g.custom_show_command('show', 'dataprotection_job_show') + + with self.command_group( + 'dataprotection restorable-time-range', + dataprotection_restorable_time_range, + client_factory=cf_restorable_time_range, + ) as g: + g.custom_command('find', 'dataprotection_restorable_time_range_find') + + with self.command_group('dataprotection', is_experimental=True): + pass diff --git a/src/dataprotection/azext_dataprotection/generated/custom.py b/src/dataprotection/azext_dataprotection/generated/custom.py new file mode 100644 index 00000000000..d52b0333d42 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/generated/custom.py @@ -0,0 +1,301 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.util import CLIError +from azure.cli.core.util import sdk_no_wait + + +def dataprotection_backup_vault_show(client, + vault_name, + resource_group_name): + return client.get(vault_name=vault_name, + resource_group_name=resource_group_name) + + +def dataprotection_backup_vault_create(client, + vault_name, + resource_group_name, + storage_settings, + e_tag=None, + location=None, + tags=None, + type_=None, + no_wait=False): + parameters = {} + parameters['e_tag'] = e_tag + parameters['location'] = location + parameters['tags'] = tags + parameters['identity'] = {} + parameters['identity']['type'] = type_ + parameters['properties'] = {} + parameters['properties']['storage_settings'] = storage_settings + return sdk_no_wait(no_wait, + client.begin_create_or_update, + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters) + + +def dataprotection_backup_vault_update(client, + vault_name, + resource_group_name, + tags=None, + type_=None, + no_wait=False): + parameters = {} + parameters['tags'] = tags + parameters['identity'] = {} + parameters['identity']['type'] = type_ + return sdk_no_wait(no_wait, + client.begin_update, + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters) + + +def dataprotection_backup_vault_delete(client, + vault_name, + resource_group_name): + return client.delete(vault_name=vault_name, + resource_group_name=resource_group_name) + + +def dataprotection_backup_policy_list(client, + vault_name, + resource_group_name): + return client.list(vault_name=vault_name, + resource_group_name=resource_group_name) + + +def dataprotection_backup_policy_show(client, + vault_name, + resource_group_name, + backup_policy_name): + return client.get(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_policy_name=backup_policy_name) + + +def dataprotection_backup_policy_create(client, + vault_name, + resource_group_name, + backup_policy_name, + backup_policy=None): + all_properties = [] + if backup_policy is not None: + all_properties.append(backup_policy) + if len(all_properties) > 1: + raise CLIError('at most one of backup_policy is needed for properties!') + properties = all_properties[0] if len(all_properties) == 1 else None + parameters = {} + parameters['properties'] = properties + return client.create_or_update(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_policy_name=backup_policy_name, + parameters=parameters) + + +def dataprotection_backup_policy_delete(client, + vault_name, + resource_group_name, + backup_policy_name): + return client.delete(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_policy_name=backup_policy_name) + + +def dataprotection_backup_instance_list(client, + vault_name, + resource_group_name): + return client.list(vault_name=vault_name, + resource_group_name=resource_group_name) + + +def dataprotection_backup_instance_show(client, + vault_name, + resource_group_name, + backup_instance_name): + return client.get(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name) + + +def dataprotection_backup_instance_create(client, + vault_name, + resource_group_name, + backup_instance_name, + friendly_name=None, + data_source_info=None, + data_source_set_info=None, + object_type=None, + policy_id=None, + policy_parameters=None, + no_wait=False): + parameters = {} + parameters['properties'] = {} + parameters['properties']['friendly_name'] = friendly_name + parameters['properties']['data_source_info'] = data_source_info + parameters['properties']['data_source_set_info'] = data_source_set_info + parameters['properties']['object_type'] = object_type + parameters['properties']['policy_info'] = {} + parameters['properties']['policy_info']['policy_id'] = policy_id + parameters['properties']['policy_info']['policy_parameters'] = policy_parameters + return sdk_no_wait(no_wait, + client.begin_create_or_update, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters) + + +def dataprotection_backup_instance_delete(client, + vault_name, + resource_group_name, + backup_instance_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name) + + +def dataprotection_backup_instance_adhoc_backup(client, + vault_name, + resource_group_name, + backup_instance_name, + rule_name, + retention_tag_override=None, + no_wait=False): + parameters = {} + parameters['backup_rule_options'] = {} + parameters['backup_rule_options']['rule_name'] = rule_name + parameters['backup_rule_options']['trigger_option'] = {} + parameters['backup_rule_options']['trigger_option']['retention_tag_override'] = retention_tag_override + return sdk_no_wait(no_wait, + client.begin_adhoc_backup, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters) + + +def dataprotection_backup_instance_restore_trigger(client, + vault_name, + resource_group_name, + backup_instance_name, + parameters, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_trigger_restore, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters) + + +def dataprotection_backup_instance_validate_for_backup(client, + vault_name, + resource_group_name, + data_source_info, + object_type, + policy_id, + friendly_name=None, + data_source_set_info=None, + policy_parameters=None, + no_wait=False): + parameters = {} + parameters['backup_instance'] = {} + parameters['backup_instance']['friendly_name'] = friendly_name + parameters['backup_instance']['data_source_info'] = data_source_info + parameters['backup_instance']['data_source_set_info'] = data_source_set_info + parameters['backup_instance']['object_type'] = object_type + parameters['backup_instance']['policy_info'] = {} + parameters['backup_instance']['policy_info']['policy_id'] = policy_id + parameters['backup_instance']['policy_info']['policy_parameters'] = policy_parameters + return sdk_no_wait(no_wait, + client.begin_validate_for_backup, + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters) + + +def dataprotection_backup_instance_validate_for_restore(client, + vault_name, + resource_group_name, + backup_instance_name, + restore_request_object, + no_wait=False): + parameters = {} + parameters['restore_request_object'] = restore_request_object + return sdk_no_wait(no_wait, + client.begin_validate_for_restore, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters) + + +def dataprotection_recovery_point_list(client, + vault_name, + resource_group_name, + backup_instance_name, + filter_=None, + skip_token=None): + return client.list(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + filter=filter_, + skip_token=skip_token) + + +def dataprotection_recovery_point_show(client, + vault_name, + resource_group_name, + backup_instance_name, + recovery_point_id): + return client.get(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + recovery_point_id=recovery_point_id) + + +def dataprotection_job_list(client, + resource_group_name, + vault_name): + return client.list(resource_group_name=resource_group_name, + vault_name=vault_name) + + +def dataprotection_job_show(client, + resource_group_name, + vault_name, + job_id): + return client.get(resource_group_name=resource_group_name, + vault_name=vault_name, + job_id=job_id) + + +def dataprotection_restorable_time_range_find(client, + vault_name, + resource_group_name, + backup_instances, + source_data_store_type, + start_time, + end_time): + parameters = {} + parameters['source_data_store_type'] = source_data_store_type + parameters['start_time'] = start_time + parameters['end_time'] = end_time + return client.find(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instances=backup_instances, + parameters=parameters) diff --git a/src/dataprotection/azext_dataprotection/manual/Manifests/AzureBlob.py b/src/dataprotection/azext_dataprotection/manual/Manifests/AzureBlob.py new file mode 100644 index 00000000000..9daa84076df --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/Manifests/AzureBlob.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +manifest = ''' +{ + "isProxyResource": false, + "resourceType": "Microsoft.Storage/storageAccounts", + "parentResourceType": "Microsoft.Storage/storageAccounts", + "datasourceType": "Microsoft.Storage/storageAccounts/blobServices", + "allowedRestoreModes": [ "PointInTimeBased" ], + "allowedRestoreTargetTypes": [ "OriginalLocation" ], + "itemLevelRecoveyEnabled": true, + "policySettings": { + "supportedRetentionTags": [], + "supportedDatastoreTypes": [ "OperationalStore" ], + "disableAddRetentionRule": true, + "disableCustomRetentionTag": true, + "backupScheduleSupported": false, + "supportedBackupFrequency": [], + "defaultPolicy": { + "policyRules": [ + { + "lifecycles": [ + { + "deleteAfter": { + "objectType": "AbsoluteDeleteOption", + "duration": "P30D" + }, + "sourceDataStore": { + "dataStoreType": "OperationalStore", + "objectType": "DataStoreInfoBase" + } + } + ], + "isDefault": true, + "name": "Default", + "objectType": "AzureRetentionRule" + } + ], + "name": "BlobPolicy1", + "datasourceTypes": [ + "Microsoft.Storage/storageAccounts/blobServices" + ], + "objectType": "BackupPolicy" + } + } +}''' diff --git a/src/dataprotection/azext_dataprotection/manual/Manifests/AzureDisk.py b/src/dataprotection/azext_dataprotection/manual/Manifests/AzureDisk.py new file mode 100644 index 00000000000..91f225818e2 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/Manifests/AzureDisk.py @@ -0,0 +1,80 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +manifest = ''' +{ + "isProxyResource": false, + "resourceType": "Microsoft.Compute/disks", + "parentResourceType": "Microsoft.Compute/disks", + "datasourceType": "Microsoft.Compute/disks", + "allowedRestoreModes": [ "RecoveryPointBased" ], + "allowedRestoreTargetTypes": [ "AlternateLocation" ], + "itemLevelRecoveyEnabled": false, + "policySettings": { + "supportedRetentionTags": [ "Daily", "Weekly" ], + "supportedDatastoreTypes": [ "OperationalStore" ], + "disableAddRetentionRule": false, + "disableCustomRetentionTag": true, + "backupScheduleSupported": true, + "supportedBackupFrequency": [ "Daily", "Hourly" ], + "defaultPolicy": { + "policyRules": [ + { + "backupParameters": { + "backupType": "Incremental", + "objectType": "AzureBackupParams" + }, + "trigger": { + "schedule": { + "repeatingTimeIntervals": [ + "R/2020-04-05T13:00:00+00:00/PT4H" + ] + }, + "taggingCriteria": [ + { + "tagInfo": { + "tagName": "Default", + "id": "Default_" + }, + "taggingPriority": 99, + "isDefault": true + } + ], + "objectType": "ScheduleBasedTriggerContext" + }, + "dataStore": { + "dataStoreType": "OperationalStore", + "objectType": "DataStoreInfoBase" + }, + "name": "BackupHourly", + "objectType": "AzureBackupRule" + }, + { + "lifecycles": [ + { + "deleteAfter": { + "objectType": "AbsoluteDeleteOption", + "duration": "P7D" + }, + "sourceDataStore": { + "dataStoreType": "OperationalStore", + "objectType": "DataStoreInfoBase" + } + } + ], + "isDefault": true, + "name": "Default", + "objectType": "AzureRetentionRule" + } + ], + "name": "DiskPolicy1", + "datasourceTypes": [ + "Microsoft.Compute/disks" + ], + "objectType": "BackupPolicy" + } + } +} +''' diff --git a/src/dataprotection/azext_dataprotection/manual/Manifests/__init__.py b/src/dataprotection/azext_dataprotection/manual/Manifests/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/Manifests/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/manual/Manifests/config.py b/src/dataprotection/azext_dataprotection/manual/Manifests/config.py new file mode 100644 index 00000000000..99b0423474c --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/Manifests/config.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +supported_datasource_types = ["AzureDisk", "AzureBlob"] diff --git a/src/dataprotection/azext_dataprotection/manual/__init__.py b/src/dataprotection/azext_dataprotection/manual/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/manual/_client_factory.py b/src/dataprotection/azext_dataprotection/manual/_client_factory.py new file mode 100644 index 00000000000..e98dc85f124 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/_client_factory.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def cf_resource_graph_client(cli_ctx, _): + from azure.mgmt.resourcegraph import ResourceGraphClient + from azure.cli.core.commands.client_factory import get_mgmt_service_client + return get_mgmt_service_client(cli_ctx, + ResourceGraphClient, subscription_bound=False) diff --git a/src/dataprotection/azext_dataprotection/manual/_help.py b/src/dataprotection/azext_dataprotection/manual/_help.py new file mode 100644 index 00000000000..76d45cac2f9 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/_help.py @@ -0,0 +1,208 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.help_files import helps + +helps['dataprotection job list-from-resourcegraph'] = """ + type: command + short-summary: List backup jobs across subscriptions, resource groups and vaults. + examples: + - name: Get backup jobs across all resource groups in current subscription which have been completed + text: az dataprotection job list-from-resourcegraph --datasource-type AzureDisk --status Completed + - name: Get backup jobs in a given set of vaults and in a given timerange + text: az dataprotection job list-from-resourcegraph --datasource-type AzureDisk --vaults MyVault1 MyVault2 --start-time 2020-11-11T01:01:00 --end-time 2020-11-14T01:01:00 +""" + +helps['dataprotection backup-instance initialize'] = """ + type: command + short-summary: Initialize JSON request body for configuring backup of a resource. + examples: + - name: Initialize backup instance request for Azure Disk + text: az dataprotection backup-instance initialize --datasource-type AzureDisk -l southeastasia --policy-id {disk_policy_id} --datasource-id {disk_id} +""" + +helps['dataprotection backup-instance create'] = """ + type: command + short-summary: Configure backup for a resource in a backup vault. + examples: + - name: create a backup instance in a backup vault + text: az dataprotection backup-instance create -g MyResourceGroup --vault-name MyVault --backup-instance backupinstance.json +""" + +helps['dataprotection backup-instance update-policy'] = """ + type: command + short-summary: Update backup policy associated with backup instance. + examples: + - name: Update backup policy associated with backup instance + text: az dataprotection backup-instance update-policy --backup-instance-name MyDisk1 --policy-id {policy_id} -g MyResourceGroup --vault-name MyVault +""" + +helps['dataprotection backup-instance list-from-resourcegraph'] = """ + type: command + short-summary: List backup instances across subscriptions, resource groups and vaults. + examples: + - name: list backup instances across multiple vaults across multiple resource groups + text: az dataprotection backup-instance list-from-resourcegraph --resource-groups resourceGroup1 resourceGroup2 --vaults vault1 vault2 --datasource-type AzureBlob + - name: list backup instances in a vault which are in a protection error state. + text: az dataprotection backup-instance list-from-resourcegraph --resource-groups resourceGroup --vaults vault --protection-status ProtectionError --datasource-type AzureDisk +""" + +helps['dataprotection backup-policy get-default-policy-template'] = """ + type: command + short-summary: Get default policy template for a given datasource type. + examples: + - name: Get default policy template for Azure Disk + text: az dataprotection backup-policy get-default-policy-template --datasource-type AzureDisk +""" + +helps['dataprotection backup-policy trigger'] = """ + type: group + short-summary: Manage backup schedule of a backup policy. +""" + +helps['dataprotection backup-policy trigger create-schedule'] = """ + type: command + short-summary: create backup schedule of a policy. + examples: + - name: create weekly backup schedule where backup is taken twice a week. + text: az dataprotection backup-policy trigger create-schedule --interval-type Weekly --interval-count 1 --schedule-days 2021-05-02T05:30:00 2021-05-03T05:30:00 + - name: create hourly backup schedule where backup frequency is every 4 hours + text: az dataprotection backup-policy trigger create-schedule --interval-type Hourly --interval-count 6 --schedule-days 2021-05-02T05:30:00 +""" + +helps['dataprotection backup-policy trigger set'] = """ + type: command + short-summary: Associate backup schedule to a backup policy. + examples: + - name: associate daily backup schedule + text: az dataprotection backup-policy trigger set --policy policy.json --schedule R/2021-05-02T05:30:00+00:00/P1D +""" + +helps['dataprotection backup-policy retention-rule'] = """ + type: group + short-summary: Create lifecycles and add or remove retention rules in a backup policy. +""" + +helps['dataprotection backup-policy retention-rule create-lifecycle'] = """ + type: command + short-summary: Create lifecycle for Azure Retention rule. + examples: + - name: create daily lifecycle + text: az dataprotection backup-policy retention-rule create-lifecycle --retention-duration-count 12 --retention-duration-type Days --source-datastore OperationalStore +""" + +helps['dataprotection backup-policy retention-rule set'] = """ + type: command + short-summary: Add new retention rule or update existing retention rule. + examples: + - name: Add daily retention rule + text: az dataprotection backup-policy retention-rule set --lifecycles dailylifecycle.json --name Daily --policy policy.json +""" + +helps['dataprotection backup-policy retention-rule remove'] = """ + type: command + short-summary: remove existing retention rule in a backup policy + examples: + - name: Remove retention rule + text: az dataprotection backup-policy retention-rule remove --name Daily --policy policy.json +""" + +helps['dataprotection backup-policy tag'] = """ + type: group + short-summary: Create criterias and add or remove tag in policy. +""" + +helps['dataprotection backup-policy tag create-absolute-criteria'] = """ + type: command + short-summary: Create absolute criteria. + examples: + - name: create absolute criteria + text: az dataprotection backup-policy tag create-absolute-criteria --absolute-criteria FirstOfDay +""" + +helps['dataprotection backup-policy tag create-generic-criteria'] = """ + type: command + short-summary: create generic criteria + examples: + - name: Create generic criteria + text: az dataprotection backup-policy tag create-generic-criteria --days-of-week Sunday Monday +""" + +helps['dataprotection backup-policy tag set'] = """ + type: command + short-summary: Add new tag or update existing tag of a backup policy. + examples: + - name: Add tag for daily retention in a backup policy. + text: az dataprotection backup-policy tag set --criteria criteria.json --name Daily --policy policy.json +""" + +helps['dataprotection backup-policy tag remove'] = """ + type: command + short-summary: Remove existing tag from a backup policy. + examples: + - name: Remove daily tag. + text: az dataprotection backup-policy tag remove --name Daily --policy policy.json +""" + +helps['dataprotection backup-instance restore'] = """ + type: group + short-summary: Restore backed up instances from recovery points in a backup vault. +""" + +helps['dataprotection backup-instance restore initialize-for-data-recovery'] = """ + type: command + short-summary: Initialize restore request object to recover all backed up data in a backup vault. + examples: + - name: initialize restore request for azure disk backup instance + text: az dataprotection backup-instance restore initialize-for-data-recovery --datasource-type AzureDisk --restore-location centraluseuap --source-datastore OperationalStore --target-resource-id {restore_disk_id} --recovery-point-id b7e6f082-b310-11eb-8f55-9cfce85d4fae +""" + +helps['dataprotection backup-instance restore initialize-for-item-recovery'] = """ + type: command + short-summary: Initialize restore request object to recover specified items of backed up data in a backup vault. + examples: + - name: initialize restore request for azure blob backup instance + text: az dataprotection backup-instance restore initialize-for-item-recovery --datasource-type AzureBlob --restore-location centraluseuap --source-datastore OperationalStore --backup-instance-id {backup_instance_id} --point-in-time 2021-05-26T15:00:00 --container-list container1 container2 +""" + +helps['dataprotection backup-instance validate-for-backup'] = """ + type: command + short-summary: Validate whether configure backup will be successful or not. + examples: + - name: Validate for backup + text: az dataprotection backup-instance validate-for-backup -g sarath-rg --vault-name sarath-vault --backup-instance backup_instance.json +""" + +helps['dataprotection backup-policy create'] = """ + type: command + short-summary: Create a backup policy belonging to a backup vault. + examples: + - name: Create backup policy + text: az dataprotection backup-policy create -g sarath-rg --vault-name sarath-vault -n mypolicy --policy policy.json +""" + +helps['dataprotection backup-vault list'] = """ + type: command + short-summary: Gets list of backup vault in a subscription or in a resource group. + examples: + - name: List backup vault in a subscription + text: az dataprotection backup-vault list + - name: List backup vault in a resource group + text: az dataprotection backup-vault list -g sarath-rg +""" + +helps['dataprotection backup-instance restore trigger'] = """ + type: command + short-summary: Triggers restore for a BackupInstance. + examples: + - name: Trigger restore + text: az dataprotection backup-instance restore trigger -g sarath-rg --vault-name sarath-vault --backup-instance-name {backup_instance_name} --restore-request-object restore_request.json +""" diff --git a/src/dataprotection/azext_dataprotection/manual/_params.py b/src/dataprotection/azext_dataprotection/manual/_params.py new file mode 100644 index 00000000000..32ef794347f --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/_params.py @@ -0,0 +1,154 @@ + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + get_enum_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import ( + validate_file_or_dict +) + +from azext_dataprotection.manual._validators import datetime_type, schedule_days_type +from azext_dataprotection.manual.enums import ( + get_protection_status_values, + get_backup_frequency_values, + get_datastore_type_values, + get_duration_type_values, + get_copy_option_values, + get_retention_rule_name_values, + get_absolute_criteria_values, + get_days_of_week_values, + get_weeks_of_month_values, + get_months_of_year_values, + get_tag_name_values, + get_job_status_values, + get_job_operation_values, + get_datasource_types +) + + +def load_arguments(self, _): + with self.argument_context('dataprotection backup-instance create') as c: + c.argument('backup_instance', type=validate_file_or_dict, help='Request body for operation Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('dataprotection backup-instance validate-for-backup') as c: + c.argument('backup_instance', type=validate_file_or_dict, help='Request body for operation Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('dataprotection backup-instance initialize') as c: + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type of the resource to be backed up") + c.argument('datasource_id', type=str, help="ARM Id of the resource to be backed up") + c.argument('datasource_location', options_list=['--datasource-location', '-l'], arg_type=get_location_type(self.cli_ctx)) + c.argument('policy_id', type=str, help="Id of the backup policy the datasource will be associated") + + with self.argument_context('dataprotection backup-instance update-policy') as c: + c.argument('backup_instance_name', type=str, help="Backup instance name.") + c.argument('resource_group_name', resource_group_name_type) + c.argument('vault_name', type=str, help="Name of the vault.") + c.argument('policy_id', type=str, help="specify the ID of the new policy with which backup instance will be associated with.") + + with self.argument_context('dataprotection recovery-point list') as c: + c.argument('start_time', type=datetime_type, help="specify the start date in UTC (yyyy-mm-ddTHH:MM:SS)") + c.argument('end_time', type=datetime_type, help="specify the end date in UTC (yyyy-mm-ddTHH:MM:SS)") + + with self.argument_context('dataprotection backup-policy create') as c: + c.argument('policy', type=validate_file_or_dict, help='Request body for operation Expected value: ' + 'json-string/@json-file.') + + with self.argument_context('dataprotection backup-policy get-default-policy-template') as c: + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type of the resource to be backed up") + + with self.argument_context('dataprotection backup-instance list-from-resourcegraph') as c: + c.argument('subscriptions', type=str, nargs='+', help="List of subscription Ids.") + c.argument('resource_groups', type=str, nargs='+', help="List of resource groups.") + c.argument('vaults', type=str, nargs='+', help="List of vault names.") + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type") + c.argument('subscriptions', type=str, nargs='+', help="List of subscription Ids.") + c.argument('protection_status', arg_type=get_enum_type(get_protection_status_values()), nargs='+', help="specify protection status.") + c.argument('datasource_id', type=str, nargs='+', help="specify datasource id filter to apply.") + + with self.argument_context('dataprotection job list-from-resourcegraph') as c: + c.argument('subscriptions', type=str, nargs='+', help="List of subscription Ids.") + c.argument('resource_groups', type=str, nargs='+', help="List of resource groups.") + c.argument('vaults', type=str, nargs='+', help="List of vault names.") + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type") + c.argument('subscriptions', type=str, nargs='+', help="List of subscription Ids.") + c.argument('start_time', type=schedule_days_type, help="specify start time of the job in UTC (yyyy-mm-ddTHH:MM:SS).") + c.argument('end_time', type=schedule_days_type, help="specify end time of the job in UTC (yyyy-mm-ddTHH:MM:SS).") + c.argument('status', arg_type=get_enum_type(get_job_status_values()), nargs='+', help="specify job status values for filter.") + c.argument('operation', arg_type=get_enum_type(get_job_operation_values()), nargs='+', help="specify job operation values for filter.") + c.argument('datasource_id', type=str, nargs='+', help="specify datasource id filter to apply") + + with self.argument_context('dataprotection backup-policy trigger create-schedule') as c: + c.argument('interval_type', arg_type=get_enum_type(get_backup_frequency_values()), help="Specify Backup Frequency.") + c.argument('interval_count', type=int, help="Specify duration of backup frequency.") + c.argument('schedule_days', type=schedule_days_type, nargs='+', help="specify the backup schedule time in UTC (yyyy-mm-ddTHH:MM:SS)") + + with self.argument_context('dataprotection backup-policy trigger set') as c: + c.argument('policy', type=validate_file_or_dict, help="Existing policy Json string or file.") + c.argument('schedule', type=str, nargs='+', help="Specify schedule time intervals for backup rule.") + + with self.argument_context('dataprotection backup-policy retention-rule create-lifecycle') as c: + c.argument('source_datastore', arg_type=get_enum_type(get_datastore_type_values()), help="Specify source datastore.") + c.argument('target_datastore', arg_type=get_enum_type(get_datastore_type_values()), help="Specify target datastore.") + c.argument('retention_duration_type', options_list=['--retention-duration-type', '--type'], arg_type=get_enum_type(get_duration_type_values()), help="Retention duration type.") + c.argument('retention_duration_count', options_list=['--retention-duration-count', '--count'], type=int, help="Retention duration count.") + c.argument('copy_option', arg_type=get_enum_type(get_copy_option_values()), help="Specify copy option from source datastore to target datastore.") + + with self.argument_context('dataprotection backup-policy retention-rule set') as c: + c.argument('name', arg_type=get_enum_type(get_retention_rule_name_values()), help="Specify the retention rule name to be edited in policy.") + c.argument('policy', type=validate_file_or_dict, help="Policy Json string or file.") + c.argument('lifecycles', type=validate_file_or_dict, nargs='+', help="lifecycles to be associated with the retention rule. Specify space separated json file names.") + + with self.argument_context('dataprotection backup-policy retention-rule remove') as c: + c.argument('name', arg_type=get_enum_type(get_retention_rule_name_values()), help="Specify the retention rule name to be removed in policy.") + c.argument('policy', type=validate_file_or_dict, help="Existing policy Json string or file.") + + with self.argument_context('dataprotection backup-policy tag create-absolute-criteria') as c: + c.argument('absolute_criteria', arg_type=get_enum_type(get_absolute_criteria_values()), help="Specify retention criteria.") + + with self.argument_context('dataprotection backup-policy tag create-generic-criteria') as c: + c.argument('days_of_week', nargs='+', arg_type=get_enum_type(get_days_of_week_values()), help="Specify days of week.") + c.argument('weeks_of_month', nargs='+', arg_type=get_enum_type(get_weeks_of_month_values()), help="Specify weeks of month") + c.argument('months_of_year', nargs='+', arg_type=get_enum_type(get_months_of_year_values()), help="Specify months of year.") + c.argument('days_of_month', nargs='+', type=str, help="Specify days of month. Allowed values are 1 to 28 and Last") + + with self.argument_context('dataprotection backup-policy tag set') as c: + c.argument('name', arg_type=get_enum_type(get_tag_name_values()), help="Specify the tag name to be edited in policy.") + c.argument('policy', type=validate_file_or_dict, help="Policy Json string or file.") + c.argument('criteria', type=validate_file_or_dict, nargs='+', help="crtierias to be associated with the tag. Specify space separated json file names.") + + with self.argument_context('dataprotection backup-policy tag remove') as c: + c.argument('name', arg_type=get_enum_type(get_tag_name_values()), help="Specify the tag name to be removed in policy.") + c.argument('policy', type=validate_file_or_dict, help="Existing policy Json string or file.") + + with self.argument_context('dataprotection backup-instance restore initialize-for-data-recovery') as c: + c.argument('target_resource_id', type=str, help="specify the resource ID to which the data will be restored.") + c.argument('recovery_point_id', type=str, help="specify the recovery point ID which will be used for restoring the data.") + c.argument('point_in_time', type=datetime_type, help="specify the point in time which will be used for restoring the data in UTC (yyyy-mm-ddTHH:MM:SS)") + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type") + c.argument('source_datastore', arg_type=get_enum_type(get_datastore_type_values()), help="Specify the datastore type of the given recovery point or point in time.") + c.argument('restore_location', type=str, help="specify the restore location.") + + with self.argument_context('dataprotection backup-instance restore initialize-for-item-recovery') as c: + c.argument('restore_location', type=str, help="specify the restore location.") + c.argument('recovery_point_id', type=str, help="specify the recovery point ID which will be used for restoring the data.") + c.argument('point_in_time', type=datetime_type, help="specify the point in time which will be used for restoring the data in UTC (yyyy-mm-ddTHH:MM:SS).") + c.argument('source_datastore', arg_type=get_enum_type(get_datastore_type_values()), help="Specify the datastore type of the given recovery point or point in time.") + c.argument('backup_instance_id', type=str, help="specify the backup instance ID.") + c.argument('datasource_type', arg_type=get_enum_type(get_datasource_types()), help="Specify the datasource type") + c.argument('container_list', type=str, nargs='+', help="specify the list of containers to restore.") + c.argument('from_prefix_pattern', type=str, nargs='+', help="specify the prefix pattern for start range.") + c.argument('to_prefix_pattern', type=str, nargs='+', help="specify the prefix pattern for end range.") + + with self.argument_context('dataprotection backup-vault list') as c: + c.argument('resource_group_name', resource_group_name_type) diff --git a/src/dataprotection/azext_dataprotection/manual/_validators.py b/src/dataprotection/azext_dataprotection/manual/_validators.py new file mode 100644 index 00000000000..a151ba016ac --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/_validators.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def datetime_type(string): + """ Validate UTC datettime in accepted format. Examples: 31-12-2017, 31-12-2017-05:30:00 """ + accepted_date_formats = ['%Y-%m-%dT%H:%M:%S'] + for form in accepted_date_formats: + try: + return string + ".0000000Z" + except ValueError: # checks next format + pass + raise ValueError("Input '{}' not valid. Valid example:2017-12-31T05:30:00".format(string)) + + +def schedule_days_type(string): + accepted_date_formats = ['%Y-%m-%dT%H:%M:%S'] + for form in accepted_date_formats: + try: + return string + except ValueError: # checks next format + pass + raise ValueError("Input '{}' not valid. Valid example: 2017-12-31T05:30:00".format(string)) diff --git a/src/dataprotection/azext_dataprotection/manual/backupcenter_helper.py b/src/dataprotection/azext_dataprotection/manual/backupcenter_helper.py new file mode 100644 index 00000000000..c27a239a2c5 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/backupcenter_helper.py @@ -0,0 +1,66 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +from azure.cli.core._profile import Profile +import azext_dataprotection.manual.helpers as helper + + +def get_selected_subscription(): + return Profile().get_subscription_id() + + +def get_backup_instance_query(datasource_type, resource_groups, vaults, protection_status, datasource_id): + query = "RecoveryServicesResources | where type =~ 'microsoft.dataprotection/backupvaults/backupinstances'" + query += "| extend vaultName = split(split(id, '/Microsoft.DataProtection/backupVaults/')[1],'/')[0]" + query += "| extend protectionState = properties.currentProtectionState" + query += "| extend datasourceId = properties.dataSourceInfo.resourceID" + + manifest = helper.load_manifest(datasource_type) + query = add_filter_to_query(query, "properties.dataSourceInfo.datasourceType", manifest["datasourceType"]) + query = add_filter_to_query(query, "resourceGroup", resource_groups) + query = add_filter_to_query(query, "vaultName", vaults) + query = add_filter_to_query(query, "protectionState", protection_status) + query = add_filter_to_query(query, "datasourceId", datasource_id) + + return query + + +def get_backup_job_query(datasource_type, resource_groups, vaults, start_time, end_time, status, operation, datasource_id): + query = "RecoveryServicesResources | where type =~ 'microsoft.dataprotection/backupvaults/backupjobs'" + query += "| extend vaultName = properties.vaultName" + query += "| extend status = properties.status" + query += "| extend operation = case( tolower(properties.operationCategory) startswith 'backup' and properties.isUserTriggered == 'true', strcat('OnDemand',properties.operationCategory)" + query += ", tolower(properties.operationCategory) startswith 'backup' and properties.isUserTriggered == 'false', strcat('Scheduled', properties.operationCategory)" + query += ", type =~ 'microsoft.dataprotection/backupVaults/backupJobs', properties.operationCategory, 'Invalid')" + query += "| extend datasourceId = properties.dataSourceId" + + manifest = helper.load_manifest(datasource_type) + query = add_filter_to_query(query, "properties.dataSourceType", manifest["datasourceType"]) + query = add_filter_to_query(query, "resourceGroup", resource_groups) + query = add_filter_to_query(query, "vaultName", vaults) + query = add_filter_to_query(query, "operation", operation) + query = add_filter_to_query(query, "status", status) + query = add_filter_to_query(query, "datasourceId", datasource_id) + + if start_time is not None: + query += "| where properties.startTime > datetime(" + start_time + "Z)" + + if end_time is not None: + query += "| where properties.endTime > datetime(" + end_time + "Z)" + + return query + + +def add_filter_to_query(query, key, values): + if values is not None: + if not isinstance(values, list): + values = [values] + + value_filter_string = "','".join(values) + query += " | where " + key + " in~ ('" + value_filter_string + "')" + + return query + return query diff --git a/src/dataprotection/azext_dataprotection/manual/commands.py b/src/dataprotection/azext_dataprotection/manual/commands.py new file mode 100644 index 00000000000..84d95a0fa19 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/commands.py @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals +# pylint: disable=line-too-long + +from azure.cli.core.commands import CliCommandType +from azext_dataprotection.generated._client_factory import ( + cf_backup_instance, cf_backup_vault +) + +from azext_dataprotection.manual._client_factory import cf_resource_graph_client + + +def load_command_table(self, _): + with self.command_group('dataprotection backup-instance') as g: + g.custom_command('initialize', "dataprotection_backup_instance_initialize") + g.custom_command('update-policy', "dataprotection_backup_instance_update_policy", client_factory=cf_backup_instance, supports_no_wait=True) + g.custom_command('list-from-resourcegraph', 'dataprotection_backup_instance_list_from_resourcegraph', client_factory=cf_resource_graph_client) + + with self.command_group('dataprotection backup-policy') as g: + g.custom_command('get-default-policy-template', "dataprotection_backup_policy_get_default_policy_template") + + with self.command_group('dataprotection backup-policy trigger') as g: + g.custom_command('create-schedule', "dataprotection_backup_policy_trigger_create_schedule") + g.custom_command('set', "dataprotection_backup_policy_trigger_set_in_policy") + + with self.command_group('dataprotection backup-policy retention-rule') as g: + g.custom_command('create-lifecycle', "dataprotection_backup_policy_create_lifecycle") + g.custom_command('set', "dataprotection_backup_policy_retention_set_in_policy") + g.custom_command('remove', "dataprotection_backup_policy_retention_remove_in_policy") + + with self.command_group('dataprotection backup-policy tag') as g: + g.custom_command('create-absolute-criteria', "dataprotection_backup_policy_create_absolute_criteria") + g.custom_command('create-generic-criteria', "dataprotection_backup_policy_create_generic_criteria") + g.custom_command('set', "dataprotection_backup_policy_tag_set_in_policy") + g.custom_command('remove', "dataprotection_backup_policy_tag_remove_in_policy") + + with self.command_group('dataprotection job') as g: + g.custom_command('list-from-resourcegraph', "dataprotection_job_list_from_resourcegraph", client_factory=cf_resource_graph_client) + + dataprotection_backup_instance = CliCommandType( + operations_tmpl='azext_dataprotection.vendored_sdks.dataprotection.operations._backup_instances_operations#BackupInstancesOperations.{}', + client_factory=cf_backup_instance + ) + + with self.command_group('dataprotection backup-instance restore', dataprotection_backup_instance, client_factory=cf_backup_instance) as g: + g.custom_command('initialize-for-data-recovery', 'restore_initialize_for_data_recovery') + g.custom_command('initialize-for-item-recovery', 'restore_initialize_for_item_recovery') + + with self.command_group('dataprotection backup-vault') as g: + g.custom_command('list', 'dataprotection_backup_vault_list', client_factory=cf_backup_vault) diff --git a/src/dataprotection/azext_dataprotection/manual/custom.py b/src/dataprotection/azext_dataprotection/manual/custom.py new file mode 100644 index 00000000000..6372ff17965 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/custom.py @@ -0,0 +1,541 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals +# pylint: disable=line-too-long +# pylint: disable=too-many-branches +import uuid +import copy +import re +from knack.util import CLIError +from knack.log import get_logger +from azure.cli.core.util import sdk_no_wait +from azure.mgmt.resourcegraph.models import \ + QueryRequest, QueryRequestOptions +import azext_dataprotection.manual.helpers as helper +import azext_dataprotection.manual.backupcenter_helper as backupcenter_helper + +logger = get_logger(__name__) + + +def dataprotection_backup_vault_list(client, resource_group_name=None): + if resource_group_name is not None: + return client.get_in_resource_group(resource_group_name=resource_group_name) + return client.get_in_subscription() + + +def dataprotection_backup_instance_create(client, vault_name, resource_group_name, backup_instance, no_wait=False): + backup_instance_name = backup_instance["backup_instance_name"] + validate_backup_instance = copy.deepcopy(backup_instance) + backup_instance["backup_instance_name"] = None + + validate_for_backup_request = {} + validate_for_backup_request['backup_instance'] = validate_backup_instance['properties'] + + sdk_no_wait(no_wait, client.begin_validate_for_backup, vault_name=vault_name, + resource_group_name=resource_group_name, parameters=validate_for_backup_request) + return sdk_no_wait(no_wait, + client.begin_create_or_update, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=backup_instance) + + +def dataprotection_backup_instance_validate_for_backup(client, vault_name, resource_group_name, backup_instance, + no_wait=False): + validate_for_backup_request = {} + validate_for_backup_request['backup_instance'] = backup_instance['properties'] + return sdk_no_wait(no_wait, client.begin_validate_for_backup, vault_name=vault_name, + resource_group_name=resource_group_name, parameters=validate_for_backup_request) + + +def dataprotection_backup_instance_initialize(datasource_type, datasource_id, datasource_location, policy_id): + datasource_info = helper.get_datasource_info(datasource_type, datasource_id, datasource_location) + datasourceset_info = None + manifest = helper.load_manifest(datasource_type) + if manifest["isProxyResource"]: + datasourceset_info = helper.get_datasourceset_info(datasource_type, datasource_id, datasource_location) + + policy_parameters = None + # Azure Disk specific code for adding datastoreparameter list in the json + if datasource_type == "AzureDisk": + policy_parameters = { + "data_store_parameters_list": [ + { + "object_type": "AzureOperationalStoreParameters", + "data_store_type": "OperationalStore", + "resource_group_id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}" + } + ] + } + + policy_info = { + "policy_id": policy_id, + "policy_parameters": policy_parameters + } + + guid = uuid.uuid1() + backup_instance_name = "" + if manifest["isProxyResource"]: + backup_instance_name = datasourceset_info["resource_name"] + "-" + datasource_info["resource_name"] + "-" + str(guid) + else: + backup_instance_name = datasource_info["resource_name"] + "-" + datasource_info["resource_name"] + "-" + str(guid) + + return { + "backup_instance_name": backup_instance_name, + "properties": { + "data_source_info": datasource_info, + "data_source_set_info": datasourceset_info, + "policy_info": policy_info, + "object_type": "BackupInstance" + } + } + + +def dataprotection_backup_instance_update_policy(client, resource_group_name, vault_name, backup_instance_name, policy_id, no_wait=False): + backup_instance = client.get(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name) + + backup_instance.properties.policy_info.policy_id = policy_id + return sdk_no_wait(no_wait, + client.begin_create_or_update, + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=backup_instance) + + +def dataprotection_backup_instance_list_from_resourcegraph(client, datasource_type, resource_groups=None, vaults=None, subscriptions=None, protection_status=None, datasource_id=None): + if subscriptions is None: + subscriptions = [backupcenter_helper.get_selected_subscription()] + query = backupcenter_helper.get_backup_instance_query(datasource_type, resource_groups, vaults, protection_status, datasource_id) + request_options = QueryRequestOptions( + top=1000, + skip=0 + ) + request = QueryRequest(query=query, subscriptions=subscriptions, options=request_options) + response = client.resources(request) + return response.data + + +def dataprotection_job_list_from_resourcegraph(client, datasource_type, resource_groups=None, vaults=None, + subscriptions=None, start_time=None, end_time=None, + status=None, operation=None, datasource_id=None): + if subscriptions is None: + subscriptions = [backupcenter_helper.get_selected_subscription()] + + query = backupcenter_helper.get_backup_job_query(datasource_type, resource_groups, vaults, start_time, end_time, status, operation, datasource_id) + request_options = QueryRequestOptions( + top=1000, + skip=0 + ) + request = QueryRequest(query=query, subscriptions=subscriptions, options=request_options) + response = client.resources(request) + return response.data + + +def dataprotection_recovery_point_list(client, vault_name, resource_group_name, backup_instance_name, + start_time=None, end_time=None): + rp_filter = "" + if start_time is not None: + rp_filter += "startDate eq '" + start_time + "'" + if end_time is not None: + if start_time is not None: + rp_filter += " and " + rp_filter += "endDate eq '" + end_time + "'" + return client.list(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + filter=rp_filter) + + +def dataprotection_backup_policy_create(client, vault_name, resource_group_name, policy, backup_policy_name): + parameters = {} + parameters['properties'] = policy + return client.create_or_update(vault_name=vault_name, + resource_group_name=resource_group_name, + backup_policy_name=backup_policy_name, + parameters=parameters) + + +def dataprotection_backup_policy_get_default_policy_template(datasource_type): + manifest = helper.load_manifest(datasource_type) + if manifest is not None and manifest["policySettings"] is not None and manifest["policySettings"]["defaultPolicy"] is not None: + return manifest["policySettings"]["defaultPolicy"] + raise CLIError("Unable to get default policy template.") + + +def dataprotection_backup_policy_trigger_create_schedule(interval_type, interval_count, schedule_days): + # Do validations on interval_type and interval_count + if interval_type.lower() in ["daily", "weekly"] and interval_count != 1: + raise CLIError("Interval Count for Daily or Weekly Backup must be 1.") + + if interval_type.lower() == "hourly" and interval_count not in [4, 6, 8, 12]: + raise CLIError("Interval Count for Hourly Backup must be one of 4, 6, 8, 12.") + + if interval_count <= 0: + raise CLIError("Interval count must be greater than zero.") + + repeating_time_intervals = [] + for day in schedule_days: + backup_frequency = helper.get_backup_frequency_string(interval_type, interval_count) + time_interval = "R/" + day + "+00:00/" + backup_frequency + repeating_time_intervals.append(time_interval) + + return repeating_time_intervals + + +def dataprotection_backup_policy_create_lifecycle(source_datastore, retention_duration_type, retention_duration_count, target_datastore=None, copy_option=None): + delete_after = { + "objectType": "AbsoluteDeleteOption", + "duration": "P" + str(retention_duration_count) + retention_duration_type[0] + } + + source_data_store = { + "objectType": "DataStoreInfoBase", + "dataStoreType": source_datastore + } + + copy_settings = None + if target_datastore is not None and copy_option is not None: + copy_settings = { + "dataStore": { + "objectType": "DataStoreInfoBase", + "dataStoreType": target_datastore + }, + "copyAfter": { + "objectType": copy_option + } + } + + return { + "deleteAfter": delete_after, + "sourceDataStore": source_data_store, + "targetDataStoreCopySettings": copy_settings + } + + +def dataprotection_backup_policy_retention_set_in_policy(policy, name, lifecycles): + retention_policy_index = -1 + for index in range(0, len(policy["policyRules"])): + if policy["policyRules"][index]["objectType"] == "AzureRetentionRule" and policy["policyRules"][index]["name"] == name: + retention_policy_index = index + break + + if retention_policy_index == -1: + datasource_type = helper.get_client_datasource_type(policy["datasourceTypes"][0]) + manifest = helper.load_manifest(datasource_type) + if manifest["policySettings"]["disableAddRetentionRule"]: + raise CLIError("Adding New Retention Rule is not supported for " + datasource_type + " datasource type") + + if name not in manifest["policySettings"]["supportedRetentionTags"]: + raise CLIError("Selected Retention Rule " + name + " is not applicable for Datasource Type " + datasource_type) + + new_retention_rule = { + "objectType": "AzureRetentionRule", + "isDefault": name == "Default", + "name": name, + "lifecycles": lifecycles + } + + policy["policyRules"].append(new_retention_rule) + return policy + + policy["policyRules"][retention_policy_index]["lifecycles"] = lifecycles + return policy + + +def dataprotection_backup_policy_retention_remove_in_policy(name, policy): + if name == "Default": + raise CLIError("Removing Default Retention Rule is not allowed. Please try again with different rule name.") + + for index in range(0, len(policy["policyRules"])): + if policy["policyRules"][index]["objectType"] == "AzureRetentionRule" and policy["policyRules"][index]["name"] == name: + policy["policyRules"].pop(index) + break + + return policy + + +def dataprotection_backup_policy_trigger_set_in_policy(policy, schedule): + datasource_type = helper.get_client_datasource_type(policy["datasourceTypes"][0]) + helper.validate_backup_schedule(datasource_type, schedule) + + backup_rule_index = -1 + for index in range(0, len(policy["policyRules"])): + if policy["policyRules"][index]["objectType"] == "AzureBackupRule": + backup_rule_index = index + break + + if index != -1: + policy["policyRules"][backup_rule_index]["trigger"]["schedule"]["repeatingTimeIntervals"] = schedule + policy["policyRules"][backup_rule_index]["name"] = helper.get_backup_frequency_from_time_interval(schedule) + + return policy + + +def dataprotection_backup_policy_create_absolute_criteria(absolute_criteria): + return { + "objectType": "ScheduleBasedBackupCriteria", + "absoluteCriteria": [absolute_criteria] + } + + +def dataprotection_backup_policy_create_generic_criteria(days_of_week=None, weeks_of_month=None, months_of_year=None, days_of_month=None): + days_of_month_criteria = None + if days_of_month is not None: + days_of_month_criteria = [] + for day_of_month in days_of_month: + if day_of_month.isdigit(): + day_of_month = int(day_of_month) + if day_of_month > 28: + raise CLIError("Day of month should be between 1 and 28.") + days_of_month_criteria.append({ + "date": day_of_month, + "is_last": False + }) + else: + if day_of_month.lower() != "last": + raise CLIError("Day of month should either be between 1 and 28 or it should be last") + days_of_month_criteria.append({"is_last": True}) + + return { + "object_type": "ScheduleBasedBackupCriteria", + "days_of_month": days_of_month_criteria, + "days_of_the_week": days_of_week, + "months_of_year": months_of_year, + "weeks_of_the_month": weeks_of_month + } + + +def dataprotection_backup_policy_tag_set_in_policy(name, policy, criteria): + datasource_type = helper.get_client_datasource_type(policy["datasourceTypes"][0]) + manifest = helper.load_manifest(datasource_type) + + if name not in manifest["policySettings"]["supportedRetentionTags"]: + raise CLIError("Selected Retention Tag " + name + " is not applicable for Datasource Type " + datasource_type) + + if manifest["policySettings"]["disableCustomRetentionTag"]: + for criterion in criteria: + if "absoluteCriteria" not in criterion: + raise CLIError("Only Absolute Criteria is supported for this policy") + + backup_rule_index = -1 + for index in range(0, len(policy["policyRules"])): + if policy["policyRules"][index]["objectType"] == "AzureBackupRule": + backup_rule_index = index + break + + if backup_rule_index != -1: + tagindex = -1 + for index in range(0, len(policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"])): + if policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"][index]["tagInfo"]["tagName"] == name: + tagindex = index + break + + if tagindex != -1: + policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"][tagindex]["Criteria"] = criteria + return policy + + tagcriteria = { + "criteria": criteria, + "isDefault": False, + "taggingPriority": helper.get_tagging_priority(name), + "tagInfo": { + "tagName": name + } + } + + policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"].append(tagcriteria) + return policy + + return policy + + +def dataprotection_backup_policy_tag_remove_in_policy(name, policy): + backup_rule_index = -1 + for index in range(0, len(policy["policyRules"])): + if policy["policyRules"][index]["objectType"] == "AzureBackupRule": + backup_rule_index = index + break + + for index in range(0, len(policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"])): + if policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"][index]["tagInfo"]["tagName"] == name: + policy["policyRules"][backup_rule_index]["trigger"]["taggingCriteria"].pop(index) + break + + return policy + + +def restore_initialize_for_data_recovery(target_resource_id, datasource_type, source_datastore, restore_location, + recovery_point_id=None, point_in_time=None): + + restore_request = {} + restore_mode = None + if recovery_point_id is not None and point_in_time is not None: + raise CLIError("Please provide either recovery point id or point in time parameter, not both.") + + if recovery_point_id is not None: + restore_request["object_type"] = "AzureBackupRecoveryPointBasedRestoreRequest" + restore_request["recovery_point_id"] = recovery_point_id + restore_mode = "RecoveryPointBased" + + if point_in_time is not None: + restore_request["object_type"] = "AzureBackupRecoveryTimeBasedRestoreRequest" + restore_request["recovery_point_time"] = point_in_time + restore_mode = "PointInTimeBased" + + if recovery_point_id is None and point_in_time is None: + raise CLIError("Please provide either recovery point id or point in time parameter.") + + manifest = helper.load_manifest(datasource_type) + if manifest is not None and manifest["allowedRestoreModes"] is not None and restore_mode not in manifest["allowedRestoreModes"]: + raise CLIError(restore_mode + " restore mode is not supported for datasource type " + datasource_type + + ". Supported restore modes are " + ','.join(manifest["allowedRestoreModes"])) + + restore_request["source_data_store_type"] = source_datastore + restore_request["restore_target_info"] = {} + restore_request["restore_target_info"]["object_type"] = "RestoreTargetInfo" + restore_request["restore_target_info"]["restore_location"] = restore_location + restore_request["restore_target_info"]["recovery_option"] = "FailIfExists" + restore_request["restore_target_info"]["datasource_info"] = helper.get_datasource_info(datasource_type, target_resource_id, restore_location) + + if manifest["isProxyResource"]: + restore_request["restore_target_info"]["datasource_set_info"] = helper.get_datasourceset_info(datasource_type, target_resource_id, restore_location) + + return restore_request + + +def restore_initialize_for_item_recovery(client, datasource_type, source_datastore, restore_location, backup_instance_id, + recovery_point_id=None, point_in_time=None, container_list=None, + from_prefix_pattern=None, to_prefix_pattern=None): + + restore_request = {} + restore_mode = None + if recovery_point_id is not None and point_in_time is not None: + raise CLIError("Please provide either recovery point id or point in time parameter, not both.") + + if recovery_point_id is not None: + restore_request["object_type"] = "AzureBackupRecoveryPointBasedRestoreRequest" + restore_request["recovery_point_id"] = recovery_point_id + restore_mode = "RecoveryPointBased" + + if point_in_time is not None: + restore_request["object_type"] = "AzureBackupRecoveryTimeBasedRestoreRequest" + restore_request["recovery_point_time"] = point_in_time + restore_mode = "PointInTimeBased" + + if recovery_point_id is None and point_in_time is None: + raise CLIError("Please provide either recovery point id or point in time parameter.") + + manifest = helper.load_manifest(datasource_type) + if manifest is not None and manifest["allowedRestoreModes"] is not None and restore_mode not in manifest["allowedRestoreModes"]: + raise CLIError(restore_mode + " restore mode is not supported for datasource type " + datasource_type + + ". Supported restore modes are " + ','.join(manifest["allowedRestoreModes"])) + + if manifest is not None and not manifest["itemLevelRecoveyEnabled"]: + raise CLIError("Specified DatasourceType " + datasource_type + " doesn't support Item Level Recovery") + + restore_request["source_data_store_type"] = source_datastore + restore_request["restore_target_info"] = {} + restore_request["restore_target_info"]["object_type"] = "ItemLevelRestoreTargetInfo" + restore_request["restore_target_info"]["restore_location"] = restore_location + restore_request["restore_target_info"]["recovery_option"] = "FailIfExists" + + restore_criteria_list = [] + if container_list is not None and (from_prefix_pattern is not None or to_prefix_pattern is not None): + raise CLIError("Please specify either container list or prefix pattern.") + + if container_list is not None: + if len(container_list) > 10: + raise CLIError("A maximum of 10 containers can be restored. Please choose up to 10 containers.") + for container in container_list: + if container[0] == '$': + raise CLIError("container name can not start with '$'. Please retry with different sets of containers.") + restore_criteria = {} + restore_criteria["object_type"] = "RangeBasedItemLevelRestoreCriteria" + restore_criteria["min_matching_value"] = container + restore_criteria["max_matching_value"] = container + "-0" + + restore_criteria_list.append(restore_criteria) + + if from_prefix_pattern is not None or to_prefix_pattern is not None: + if from_prefix_pattern is None or to_prefix_pattern is None or \ + len(from_prefix_pattern) != len(to_prefix_pattern) or len(from_prefix_pattern) > 10: + raise CLIError( + "from-prefix-pattern and to-prefix-pattern should not be null, both of them should have " + "equal length and can have a maximum of 10 patterns." + ) + + for index in range(len(from_prefix_pattern)): + if from_prefix_pattern[index][0] == '$' or to_prefix_pattern[index][0] == '$': + raise CLIError( + "Prefix patterns should not start with '$'. Please provide valid prefix patterns and try again." + ) + + if not 3 <= len(from_prefix_pattern[index]) <= 63 or not 3 <= len(to_prefix_pattern[index]) <= 63: + raise CLIError( + "Prefix patterns needs to be between 3 to 63 characters." + ) + + if from_prefix_pattern[index] >= to_prefix_pattern[index]: + raise CLIError( + "From prefix pattern must be less than to prefix pattern." + ) + + regex_pattern = r"^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9](\/.{1,60})*$" + if re.match(regex_pattern, from_prefix_pattern[index]) is None: + raise CLIError( + "prefix patterns must start or end with a letter or number," + "and can contain only lowercase letters, numbers, and the dash (-) character. " + "consecutive dashes are not permitted." + "Given pattern " + from_prefix_pattern[index] + " violates the above rule." + ) + + if re.match(regex_pattern, to_prefix_pattern[index]) is None: + raise CLIError( + "prefix patterns must start or end with a letter or number," + "and can contain only lowercase letters, numbers, and the dash (-) character. " + "consecutive dashes are not permitted." + "Given pattern " + to_prefix_pattern[index] + " violates the above rule." + ) + + for compareindex in range(index + 1, len(from_prefix_pattern)): + if (from_prefix_pattern[index] <= from_prefix_pattern[compareindex] and to_prefix_pattern[index] >= from_prefix_pattern[compareindex]) or \ + (from_prefix_pattern[index] >= from_prefix_pattern[compareindex] and from_prefix_pattern[index] <= to_prefix_pattern[compareindex]): + raise CLIError( + "overlapping ranges are not allowed." + ) + + for index in range(len(from_prefix_pattern)): + restore_criteria = {} + restore_criteria["object_type"] = "RangeBasedItemLevelRestoreCriteria" + restore_criteria["min_matching_value"] = from_prefix_pattern[index] + restore_criteria["max_matching_value"] = to_prefix_pattern[index] + + restore_criteria_list.append(restore_criteria) + + if container_list is None and from_prefix_pattern is None and to_prefix_pattern is None: + raise CLIError("Provide ContainersList or Prefixes for Item Level Recovery") + + restore_request["restore_target_info"]["restore_criteria"] = restore_criteria_list + + vault_resource_group = backup_instance_id.split('/')[4] + vault_name = backup_instance_id.split('/')[8] + backup_instance_name = backup_instance_id.split('/')[-1] + + backup_instance = client.get(vault_name=vault_name, resource_group_name=vault_resource_group, backup_instance_name=backup_instance_name) + datasource_id = backup_instance.properties.data_source_info.resource_id + + restore_request["restore_target_info"]["datasource_info"] = helper.get_datasource_info(datasource_type, datasource_id, restore_location) + + if manifest["isProxyResource"]: + restore_request["restore_target_info"]["datasource_set_info"] = helper.get_datasourceset_info(datasource_type, datasource_id, restore_location) + + return restore_request diff --git a/src/dataprotection/azext_dataprotection/manual/enums.py b/src/dataprotection/azext_dataprotection/manual/enums.py new file mode 100644 index 00000000000..73b769a03a7 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/enums.py @@ -0,0 +1,62 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def get_protection_status_values(): + return ['ProtectionConfigured', 'ProtectionError'] + + +def get_backup_frequency_values(): + return ['Daily', 'Weekly', 'Hourly'] + + +def get_datastore_type_values(): + return ['ArchiveStore', 'OperationalStore', 'VaultStore'] + + +def get_duration_type_values(): + return ['Days', 'Weeks', 'Months', 'Years'] + + +def get_copy_option_values(): + return ['CustomCopyOption', 'ImmediateCopyOption'] + + +def get_retention_rule_name_values(): + return ['Default', 'Daily', 'Weekly', 'Monthly', 'Yearly'] + + +def get_tag_name_values(): + return ['Daily', 'Weekly', 'Monthly', 'Yearly'] + + +def get_absolute_criteria_values(): + return ['AllBackup', 'FirstOfDay', 'FirstOfMonth', 'FirstOfWeek', 'FirstOfYear'] + + +def get_days_of_week_values(): + return ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] + + +def get_weeks_of_month_values(): + return ['First', 'Second', 'Third', 'Fourth', 'Last'] + + +def get_months_of_year_values(): + return ['January', 'February', 'March', 'April', 'May', 'June', 'July', + 'August', 'September', 'October', 'November', 'December'] + + +def get_job_status_values(): + return ['InProgress', 'Completed', 'Failed'] + + +def get_job_operation_values(): + return ['OnDemandBackup', 'ScheduledBackup', 'Restore'] + + +def get_datasource_types(): + import azext_dataprotection.manual.helpers as helpers + return helpers.get_supported_datasource_types() diff --git a/src/dataprotection/azext_dataprotection/manual/helpers.py b/src/dataprotection/azext_dataprotection/manual/helpers.py new file mode 100644 index 00000000000..f5a4ee782a1 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/helpers.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import json +from importlib import import_module +from knack.util import CLIError + + +def load_manifest(datasource_type): + module = import_module('azext_dataprotection.manual.Manifests.' + datasource_type) + return json.loads(module.manifest) + + +def get_supported_datasource_types(): + module = import_module('azext_dataprotection.manual.Manifests.config') + return module.supported_datasource_types + + +def get_client_datasource_type(service_datasource_type): + datasource_types = get_supported_datasource_types() + for datasource_type in datasource_types: + manifest = load_manifest(datasource_type) + if manifest["datasourceType"] == service_datasource_type: + return datasource_type + return None + + +def get_datasource_info(datasource_type, resource_id, resource_location): + manifest = load_manifest(datasource_type) + return { + "datasource_type": manifest["datasourceType"], + "object_type": "Datasource", + "resource_name": resource_id.split("/")[-1], + "resource_type": manifest["resourceType"], + "resource_uri": "", + "resource_id": resource_id, + "resource_location": resource_location + } + + +def get_datasourceset_info(datasource_type, resource_id, resource_location): + manifest = load_manifest(datasource_type) + return { + "datasource_type": manifest["datasourceType"], + "object_type": "DatasourceSet", + "resource_name": resource_id.split("/")[-3], + "resource_type": manifest["resourceType"].split("/")[:-1], + "resource_uri": "", + "resource_id": resource_id.split("/")[:-2], + "resource_location": resource_location + } + + +def get_backup_frequency_string(frequency, count): + if frequency.lower() == "weekly": + return "P1W" + if frequency.lower() == "daily": + return "P1D" + if frequency.lower() == "hourly": + return "PT" + str(count) + "H" + return "" + + +def validate_backup_schedule(datasource_type, schedule): + manifest = load_manifest(datasource_type) + if not manifest["policySettings"]["backupScheduleSupported"]: + raise CLIError("Adding Backup Schedule is not supported for Datasource Type " + datasource_type) + + backup_freq_map = {"D": "Daily", "H": "Hourly", "W": "Weekly"} + if backup_freq_map[schedule[0][-1]] not in manifest["policySettings"]["supportedBackupFrequency"]: + raise CLIError( + backup_freq_map[schedule[0][-1]] + " Backup Schedule is not supported for " + datasource_type + " policy" + ) + + +def get_backup_frequency_from_time_interval(repeating_time_intervals): + backup_freq_map = {"D": "Daily", "H": "Hourly", "W": "Weekly"} + return "Backup" + backup_freq_map[repeating_time_intervals[0][-1]] + + +def get_tagging_priority(name): + priorityMap = {"Default": 99, "Daily": 25, "Weekly": 20, "Monthly": 15, "Yearly": 10} + return priorityMap[name] diff --git a/src/dataprotection/azext_dataprotection/manual/tests/__init__.py b/src/dataprotection/azext_dataprotection/manual/tests/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/tests/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/manual/tests/latest/__init__.py b/src/dataprotection/azext_dataprotection/manual/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/manual/tests/latest/test_dataprotection_scenario.py b/src/dataprotection/azext_dataprotection/manual/tests/latest/test_dataprotection_scenario.py new file mode 100644 index 00000000000..031d9b18527 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/manual/tests/latest/test_dataprotection_scenario.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=unused-import + + +def setup(test): + # import time + test.kwargs.update({ + "vaultName": "cli-test-new-vault", + "rg": "sarath-rg", + "diskname": "cli-test-disk-new", + "restorediskname": "cli-test-disk-new-restored", + "policyname": "diskpolicy" + }) + account_res = test.cmd('az account show').get_output_in_json() + vault_res = test.cmd('az dataprotection backup-vault create ' + '-g "{rg}" --vault-name "{vaultName}" -l centraluseuap ' + '--storage-settings datastore-type="VaultStore" type="LocallyRedundant" --type SystemAssigned', + checks=[]).get_output_in_json() + + disk_response = test.cmd('az disk create -g "{rg}" -n "{diskname}" --size-gb 4').get_output_in_json() + test.kwargs.update({ + "principalId": vault_res["identity"]["principalId"], + "diskid": disk_response["id"], + "rgid": "/subscriptions/" + account_res["id"] + "/resourceGroups/sarath-rg" + }) + + # run the below commands only in record mode + # time.sleep(180) + # test.cmd('az role assignment create --assignee "{principalId}" --role "Disk Backup Reader" --scope "{diskid}"') + # test.cmd('az role assignment create --assignee "{principalId}" --role "Disk Snapshot Contributor" --scope "{rgid}"') + # test.cmd('az role assignment create --assignee "{principalId}" --role "Disk Restore Operator" --scope "{rgid}"') + + +def create_policy(test): + policy_json = test.cmd('az dataprotection backup-policy get-default-policy-template --datasource-type AzureDisk').get_output_in_json() + test.kwargs.update({"policyjson": policy_json}) + test.cmd('az dataprotection backup-policy create -n "{policyname}" --policy "{policyjson}" -g "{rg}" --vault-name "{vaultName}"') + + policy_id = test.cmd('az dataprotection backup-policy show -g "{rg}" --vault-name "{vaultName}" -n "{policyname}" --query "id"').get_output_in_json() + test.kwargs.update({"policyid": policy_id}) + + lifecycle_json = test.cmd('az dataprotection backup-policy retention-rule create-lifecycle' + ' --count 12 --type Days --source-datastore OperationalStore').get_output_in_json() + test.kwargs.update({"lifecycle": lifecycle_json}) + policy_json = test.cmd('az dataprotection backup-policy retention-rule set ' + ' --name Daily --policy "{policyjson}" --lifecycles "{lifecycle}"').get_output_in_json() + test.kwargs.update({"policyjson": policy_json}) + + criteria_json = test.cmd('az dataprotection backup-policy tag create-absolute-criteria --absolute-criteria FirstOfDay').get_output_in_json() + test.kwargs.update({"criteria": criteria_json}) + policy_json = test.cmd('az dataprotection backup-policy tag set ' + ' --name Daily --policy "{policyjson}" --criteria "{criteria}"').get_output_in_json() + test.kwargs.update({"policyjson": policy_json}) + + schedule_json = test.cmd('az dataprotection backup-policy trigger create-schedule --interval-type Hourly --interval-count 6 --schedule-days 2021-05-02T05:30:00').get_output_in_json() + test.kwargs.update({"repeating_time_interval": schedule_json[0]}) + + policy_json = test.cmd('az dataprotection backup-policy trigger set ' + ' --policy "{policyjson}" --schedule "{repeating_time_interval}"').get_output_in_json() + test.kwargs.update({"policyjson": policy_json}) + test.cmd('az dataprotection backup-policy create -n diskhourlypolicy --policy "{policyjson}" -g "{rg}" --vault-name "{vaultName}"') + + +def trigger_disk_backup(test): + # import time + response_json = test.cmd('az dataprotection backup-instance adhoc-backup -n "{backup_instance_name}" -g "{rg}" --vault-name "{vaultName}" --rule-name BackupHourly --retention-tag-override Default').get_output_in_json() + job_status = None + test.kwargs.update({"backup_job_id": response_json["jobId"]}) + while job_status != "Completed": + # run the below code only in record mode + # time.sleep(10) + job_response = test.cmd('az dataprotection job show --ids "{backup_job_id}"').get_output_in_json() + job_status = job_response["properties"]["status"] + if job_status not in ["Completed", "InProgress"]: + raise Exception("Undefined job status received") + + +def trigger_disk_restore(test): + # import time + rp_json = test.cmd('az dataprotection recovery-point list --backup-instance-name "{backup_instance_name}" -g "{rg}" --vault-name "{vaultName}"').get_output_in_json() + test.kwargs.update({"rp_id": rp_json[0]["name"]}) + split_disk_id = test.kwargs["diskid"].split("/") + split_disk_id[-1] = test.kwargs["restorediskname"] + restore_disk_id = "/".join(split_disk_id) + test.kwargs.update({"restore_disk_id": restore_disk_id}) + + restore_json = test.cmd('az dataprotection backup-instance restore initialize-for-data-recovery' + ' --datasource-type AzureDisk --restore-location centraluseuap --source-datastore OperationalStore ' + '--recovery-point-id "{rp_id}" --target-resource-id "{restore_disk_id}"').get_output_in_json() + test.kwargs.update({"restore_request": restore_json}) + test.cmd('az dataprotection backup-instance validate-for-restore -g "{rg}" --vault-name "{vaultName}" -n "{backup_instance_name}" --restore-request-object "{restore_request}"') + + response_json = test.cmd('az dataprotection backup-instance restore trigger -g "{rg}" --vault-name "{vaultName}"' + ' -n "{backup_instance_name}" --restore-request-object "{restore_request}"').get_output_in_json() + job_status = None + test.kwargs.update({"backup_job_id": response_json["jobId"]}) + while job_status != "Completed": + # run the below code only in record mode + # time.sleep(10) + job_response = test.cmd('az dataprotection job show --ids "{backup_job_id}"').get_output_in_json() + job_status = job_response["properties"]["status"] + if job_status not in ["Completed", "InProgress"]: + raise Exception("Undefined job status received") + + +def configure_backup(test): + import time + backup_instance_guid = "b7e6f082-b310-11eb-8f55-9cfce85d4fae" + backup_instance_json = test.cmd('az dataprotection backup-instance initialize --datasource-type AzureDisk' + ' -l centraluseuap --policy-id "{policyid}" --datasource-id "{diskid}"').get_output_in_json() + backup_instance_json["properties"]["policy_info"]["policy_parameters"]["data_store_parameters_list"][0]["resource_group_id"] = test.kwargs["rgid"] + backup_instance_json["backup_instance_name"] = test.kwargs['diskname'] + "-" + test.kwargs['diskname'] + "-" + backup_instance_guid + test.kwargs.update({ + "backup_instance_json": backup_instance_json, + "backup_instance_name": backup_instance_json["backup_instance_name"] + }) + test.cmd('az dataprotection backup-instance create -g "{rg}" --vault-name "{vaultName}" --backup-instance "{backup_instance_json}"') + + backup_instance_res = test.cmd('az dataprotection backup-instance list -g "{rg}" --vault-name "{vaultName}" --query "[0].properties.protectionStatus"').get_output_in_json() + protection_status = backup_instance_res["status"] + while protection_status != "ProtectionConfigured": + # run the below line only in record mode + # time.sleep(10) + backup_instance_res = test.cmd('az dataprotection backup-instance list -g "{rg}" --vault-name "{vaultName}" --query "[0].properties.protectionStatus"').get_output_in_json() + protection_status = backup_instance_res["status"] + + # run the below line only in record mode + time.sleep(30) + + +def delete_backup(test): + test.cmd('az dataprotection backup-instance delete -g "{rg}" --vault-name "{vaultName}" -n "{backup_instance_name}" --yes') + + +def cleanup(test): + delete_backup(test) + test.cmd('az dataprotection backup-vault delete ' + ' -g "{rg}" --vault-name "{vaultName}" --yes') + test.cmd('az disk delete --name "{diskname}" --resource-group "{rg}" --yes') + test.cmd('az disk delete --name "{restorediskname}" --resource-group "{rg}" --yes') + + +def call_scenario(test): + setup(test) + try: + create_policy(test) + configure_backup(test) + trigger_disk_backup(test) + trigger_disk_restore(test) + except Exception as e: + raise e + finally: + cleanup(test) diff --git a/src/dataprotection/azext_dataprotection/tests/__init__.py b/src/dataprotection/azext_dataprotection/tests/__init__.py new file mode 100644 index 00000000000..70488e93851 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/__init__.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +import inspect +import logging +import os +import sys +import traceback +import datetime as dt + +from azure.core.exceptions import AzureError +from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError + + +logger = logging.getLogger('azure.cli.testsdk') +logger.addHandler(logging.StreamHandler()) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) +exceptions = [] +test_map = dict() +SUCCESSED = "successed" +FAILED = "failed" + + +def try_manual(func): + def import_manual_function(origin_func): + from importlib import import_module + decorated_path = inspect.getfile(origin_func).lower() + module_path = __path__[0].lower() + if not decorated_path.startswith(module_path): + raise Exception("Decorator can only be used in submodules!") + manual_path = os.path.join( + decorated_path[module_path.rfind(os.path.sep) + 1:]) + manual_file_path, manual_file_name = os.path.split(manual_path) + module_name, _ = os.path.splitext(manual_file_name) + manual_module = "..manual." + \ + ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) + return getattr(import_module(manual_module, package=__name__), origin_func.__name__) + + def get_func_to_call(): + func_to_call = func + try: + func_to_call = import_manual_function(func) + logger.info("Found manual override for %s(...)", func.__name__) + except (ImportError, AttributeError): + pass + return func_to_call + + def wrapper(*args, **kwargs): + func_to_call = get_func_to_call() + logger.info("running %s()...", func.__name__) + try: + test_map[func.__name__] = dict() + test_map[func.__name__]["result"] = SUCCESSED + test_map[func.__name__]["error_message"] = "" + test_map[func.__name__]["error_stack"] = "" + test_map[func.__name__]["error_normalized"] = "" + test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() + ret = func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, + JMESPathCheckAssertionError) as e: + use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE") + if use_exception_cache is None or use_exception_cache.lower() != "true": + raise + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + test_map[func.__name__]["result"] = FAILED + test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] + test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( + "\r\n", " ").replace("\n", " ")[:500] + logger.info("--------------------------------------") + logger.info("step exception: %s", e) + logger.error("--------------------------------------") + logger.error("step exception in %s: %s", func.__name__, e) + logger.info(traceback.format_exc()) + exceptions.append((func.__name__, sys.exc_info())) + else: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + return ret + + if inspect.isclass(func): + return get_func_to_call() + return wrapper + + +def calc_coverage(filename): + filename = filename.split(".")[0] + coverage_name = filename + "_coverage.md" + with open(coverage_name, "w") as f: + f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") + total = len(test_map) + covered = 0 + for k, v in test_map.items(): + if not k.startswith("step_"): + total -= 1 + continue + if v["result"] == SUCCESSED: + covered += 1 + f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" + "{end_dt}|\n".format(step_name=k, **v)) + f.write("Coverage: {}/{}\n".format(covered, total)) + print("Create coverage\n", file=sys.stderr) + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/dataprotection/azext_dataprotection/tests/latest/__init__.py b/src/dataprotection/azext_dataprotection/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/tests/latest/example_steps.py b/src/dataprotection/azext_dataprotection/tests/latest/example_steps.py new file mode 100644 index 00000000000..6d1f2866815 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/latest/example_steps.py @@ -0,0 +1,397 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +from .. import try_manual + + +# EXAMPLE: /BackupPolicies/put/CreateOrUpdate BackupPolicy +@try_manual +def step_backup_policy_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-policy create ' + '--name "{myBackupPolicy}" ' + '--properties "{{\\"datasourceTypes\\":[\\"OssDB\\"],\\"objectType\\":\\"BackupPolicy\\",\\"policyRules\\"' + ':[{{\\"name\\":\\"BackupWeekly\\",\\"backupParameters\\":{{\\"backupType\\":\\"Full\\",\\"objectType\\":' + '\\"AzureBackupParams\\"}},\\"dataStore\\":{{\\"dataStoreType\\":\\"VaultStore\\",\\"objectType\\":\\"Data' + 'StoreInfoBase\\"}},\\"objectType\\":\\"AzureBackupRule\\",\\"trigger\\":{{\\"objectType\\":\\"ScheduleBas' + 'edTriggerContext\\",\\"schedule\\":{{\\"repeatingTimeIntervals\\":[\\"R/2019-11-20T08:00:00-08:00/P1W\\"]' + '}},\\"taggingCriteria\\":[{{\\"isDefault\\":true,\\"tagInfo\\":{{\\"tagName\\":\\"Default\\"}},\\"tagging' + 'Priority\\":99}},{{\\"criteria\\":[{{\\"daysOfTheWeek\\":[\\"Sunday\\"],\\"objectType\\":\\"ScheduleBased' + 'BackupCriteria\\",\\"scheduleTimes\\":[\\"2019-03-01T13:00:00Z\\"]}}],\\"isDefault\\":false,\\"tagInfo\\"' + ':{{\\"tagName\\":\\"Weekly\\"}},\\"taggingPriority\\":20}}]}}}},{{\\"name\\":\\"Default\\",\\"isDefault\\' + '":true,\\"lifecycles\\":[{{\\"deleteAfter\\":{{\\"duration\\":\\"P1W\\",\\"objectType\\":\\"AbsoluteDelet' + 'eOption\\"}},\\"sourceDataStore\\":{{\\"dataStoreType\\":\\"VaultStore\\",\\"objectType\\":\\"DataStoreIn' + 'foBase\\"}}}}],\\"objectType\\":\\"AzureRetentionRule\\"}},{{\\"name\\":\\"Weekly\\",\\"isDefault\\":fals' + 'e,\\"lifecycles\\":[{{\\"deleteAfter\\":{{\\"duration\\":\\"P12W\\",\\"objectType\\":\\"AbsoluteDeleteOpt' + 'ion\\"}},\\"sourceDataStore\\":{{\\"dataStoreType\\":\\"VaultStore\\",\\"objectType\\":\\"DataStoreInfoBa' + 'se\\"}}}}],\\"objectType\\":\\"AzureRetentionRule\\"}}]}}" ' + '--resource-group "{rg_2}" ' + '--vault-name "PrivatePreviewVault"', + checks=checks) + + +# EXAMPLE: /BackupPolicies/get/Get BackupPolicy +@try_manual +def step_backup_policy_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-policy show ' + '--name "{myBackupPolicy}" ' + '--resource-group "{rg_2}" ' + '--vault-name "PrivatePreviewVault"', + checks=checks) + + +# EXAMPLE: /BackupPolicies/get/List BackupPolicy +@try_manual +def step_backup_policy_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-policy list ' + '--resource-group "{rg_2}" ' + '--vault-name "PrivatePreviewVault"', + checks=checks) + + +# EXAMPLE: /BackupInstances/put/Create BackupInstance +@try_manual +def step_backup_instance_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance create ' + '--name "{myBackupInstance}" ' + '--data-source-info datasource-type="OssDB" object-type="Datasource" resource-id="/subscriptions/{subscrip' + 'tion_id}/resourceGroups/{rg_3}/providers/Microsoft.DBforPostgreSQL/servers/{rg_3}/databases/testdb" ' + 'resource-location="" resource-name="testdb" resource-type="Microsoft.DBforPostgreSQL/servers/databases" ' + 'resource-uri="" ' + '--data-source-set-info datasource-type="OssDB" object-type="DatasourceSet" ' + 'resource-id="/subscriptions/{subscription_id}/resourceGroups/{rg_3}/providers/Microsoft.DBforPostgreSQL/s' + 'ervers/{rg_3}" resource-location="" resource-name="{rg_3}" resource-type="Microsoft.DBforPostgreSQL/serve' + 'rs" resource-uri="" ' + '--friendly-name "harshitbi2" ' + '--object-type "BackupInstance" ' + '--policy-id "/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.DataProtection/Ba' + 'ckupvaults/{myBackupVault}/backupPolicies/{myBackupPolicy2}" ' + '--policy-parameters data-store-parameters-list={{"dataStoreType":"OperationalStore","objectType":"AzureOp' + 'erationalStoreParameters","resourceGroupId":"/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resource' + 'Groups/viveksipgtest"}} ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=[]) + test.cmd('az dataprotection backup-instance wait --created ' + '--name "{myBackupInstance}" ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/get/List BackupInstances in a Vault +@try_manual +def step_backup_instance_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance list ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Trigger Adhoc Backup +@try_manual +def step_backup_instance_adhoc_backup(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance adhoc-backup ' + '--name "{myBackupInstance}" ' + '--rule-name "BackupWeekly" ' + '--retention-tag-override "yearly" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Trigger Restore +@try_manual +def step_backup_instance_restore_trigger(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance restore trigger ' + '--name "{myBackupInstance}" ' + '--restore-request-object "{{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recover' + 'yPointId\\":\\"hardcodedRP\\",\\"restoreTargetInfo\\":{{\\"datasourceInfo\\":{{\\"datasourceType\\":\\"Os' + 'sDB\\",\\"objectType\\":\\"Datasource\\",\\"resourceID\\":\\"/subscriptions/{subscription_id}/resourceGro' + 'ups/{rg_3}/providers/Microsoft.DBforPostgreSQL/servers/{rg_3}/databases/testdb\\",\\"resourceLocation\\":' + '\\"\\",\\"resourceName\\":\\"testdb\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers/databases' + '\\",\\"resourceUri\\":\\"\\"}},\\"datasourceSetInfo\\":{{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\' + '":\\"DatasourceSet\\",\\"resourceID\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_3}/provider' + 's/Microsoft.DBforPostgreSQL/servers/{rg_3}\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"{rg_3}' + '\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers\\",\\"resourceUri\\":\\"\\"}},\\"objectType\\' + '":\\"RestoreTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\":\\"southeastasia' + '\\"}},\\"sourceDataStoreType\\":\\"VaultStore\\"}}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Trigger Restore As Files +@try_manual +def step_backup_instance_restore_trigger2(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance restore trigger ' + '--name "{myBackupInstance}" ' + '--restore-request-object "{{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recover' + 'yPointId\\":\\"hardcodedRP\\",\\"restoreTargetInfo\\":{{\\"objectType\\":\\"RestoreFilesTargetInfo\\",\\"' + 'recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\":\\"southeastasia\\",\\"targetDetails\\":{{\\"f' + 'ilePrefix\\":\\"restoredblob\\",\\"restoreTargetLocationType\\":\\"AzureBlobs\\",\\"url\\":\\"https://tes' + 'tstorage.blob.core.windows.net/restoretest\\"}}}},\\"sourceDataStoreType\\":\\"VaultStore\\"}}" ' + '--resource-group "{rg_2}" ' + '--vault-name "PrivatePreviewVault1"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Trigger Restore With Rehydration +@try_manual +def step_backup_instance_restore_trigger3(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance restore trigger ' + '--name "{myBackupInstance}" ' + '--restore-request-object "{{\\"objectType\\":\\"AzureBackupRestoreWithRehydrationRequest\\",\\"recoveryPo' + 'intId\\":\\"hardcodedRP\\",\\"rehydrationPriority\\":\\"High\\",\\"rehydrationRetentionDuration\\":\\"7D' + '\\",\\"restoreTargetInfo\\":{{\\"datasourceInfo\\":{{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\":\\' + '"Datasource\\",\\"resourceID\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_3}/providers/Micro' + 'soft.DBforPostgreSQL/servers/{rg_3}/databases/testdb\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":' + '\\"testdb\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers/databases\\",\\"resourceUri\\":\\"\\' + '"}},\\"datasourceSetInfo\\":{{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\":\\"DatasourceSet\\",\\"re' + 'sourceID\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_3}/providers/Microsoft.DBforPostgreSQL' + '/servers/{rg_3}\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"{rg_3}\\",\\"resourceType\\":\\"Mi' + 'crosoft.DBforPostgreSQL/servers\\",\\"resourceUri\\":\\"\\"}},\\"objectType\\":\\"RestoreTargetInfo\\",\\' + '"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\":\\"southeastasia\\"}},\\"sourceDataStoreType' + '\\":\\"VaultStore\\"}}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Validate For Backup +@try_manual +def step_backup_instance_validate_for_backup(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance validate-for-backup ' + '--data-source-info datasource-type="OssDB" object-type="Datasource" resource-id="/subscriptions/{subscrip' + 'tion_id}/resourceGroups/{rg_3}/providers/Microsoft.DBforPostgreSQL/servers/{rg_3}/databases/testdb" ' + 'resource-location="" resource-name="testdb" resource-type="Microsoft.DBforPostgreSQL/servers/databases" ' + 'resource-uri="" ' + '--data-source-set-info datasource-type="OssDB" object-type="DatasourceSet" ' + 'resource-id="/subscriptions/{subscription_id}/resourceGroups/{rg_3}/providers/Microsoft.DBforPostgreSQL/s' + 'ervers/{rg_3}" resource-location="" resource-name="{rg_3}" resource-type="Microsoft.DBforPostgreSQL/serve' + 'rs" resource-uri="" ' + '--friendly-name "harshitbi2" ' + '--object-type "BackupInstance" ' + '--policy-id "/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.DataProtection/Ba' + 'ckupvaults/{myBackupVault}/backupPolicies/{myBackupPolicy2}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/post/Validate Restore +@try_manual +def step_backup_instance_validate_for_restore(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance validate-for-restore ' + '--name "{myBackupInstance}" ' + '--restore-request-object "{{\\"objectType\\":\\"AzureBackupRecoveryPointBasedRestoreRequest\\",\\"recover' + 'yPointId\\":\\"hardcodedRP\\",\\"restoreTargetInfo\\":{{\\"datasourceInfo\\":{{\\"datasourceType\\":\\"Os' + 'sDB\\",\\"objectType\\":\\"Datasource\\",\\"resourceID\\":\\"/subscriptions/{subscription_id}/resourceGro' + 'ups/{rg_3}/providers/Microsoft.DBforPostgreSQL/servers/{rg_3}/databases/testdb\\",\\"resourceLocation\\":' + '\\"\\",\\"resourceName\\":\\"testdb\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers/databases' + '\\",\\"resourceUri\\":\\"\\"}},\\"datasourceSetInfo\\":{{\\"datasourceType\\":\\"OssDB\\",\\"objectType\\' + '":\\"DatasourceSet\\",\\"resourceID\\":\\"/subscriptions/{subscription_id}/resourceGroups/{rg_3}/provider' + 's/Microsoft.DBforPostgreSQL/servers/{rg_3}\\",\\"resourceLocation\\":\\"\\",\\"resourceName\\":\\"{rg_3}' + '\\",\\"resourceType\\":\\"Microsoft.DBforPostgreSQL/servers\\",\\"resourceUri\\":\\"\\"}},\\"objectType\\' + '":\\"RestoreTargetInfo\\",\\"recoveryOption\\":\\"FailIfExists\\",\\"restoreLocation\\":\\"southeastasia' + '\\"}},\\"sourceDataStoreType\\":\\"VaultStore\\"}}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupPolicies/delete/Delete BackupPolicy +@try_manual +def step_backup_policy_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-policy delete -y ' + '--name "{myBackupPolicy}" ' + '--resource-group "{rg_2}" ' + '--vault-name "PrivatePreviewVault"', + checks=checks) + + +# EXAMPLE: /BackupVaults/put/Create BackupVault +@try_manual +def step_backup_vault_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-vault create ' + '--type "None" ' + '--location "WestUS" ' + '--storage-settings type="LocallyRedundant" datastore-type="VaultStore" ' + '--tags key1="val1" ' + '--resource-group "{rg}" ' + '--vault-name "swaggerExample"', + checks=checks) + + +# EXAMPLE: /BackupVaults/put/Create BackupVault With MSI +@try_manual +def step_backup_vault_create2(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-vault create ' + '--type "systemAssigned" ' + '--location "WestUS" ' + '--storage-settings type="LocallyRedundant" datastore-type="VaultStore" ' + '--tags key1="val1" ' + '--resource-group "{rg}" ' + '--vault-name "swaggerExample"', + checks=checks) + + +# EXAMPLE: /BackupVaults/get/Get BackupVault +@try_manual +def step_backup_vault_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-vault show ' + '--resource-group "{rg}" ' + '--vault-name "swaggerExample"', + checks=checks) + + +# EXAMPLE: /BackupVaults/get/Get BackupVault With MSI +@try_manual +def step_backup_vault_show2(test, checks=None): + return step_backup_vault_show(test, checks) + + +# EXAMPLE: /BackupVaults/patch/Patch BackupVault +@try_manual +def step_backup_vault_update(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-vault update ' + '--tags newKey="newVal" ' + '--resource-group "{rg}" ' + '--vault-name "swaggerExample"', + checks=checks) + + +# EXAMPLE: /BackupInstances/get/Get BackupInstance +@try_manual +def step_backup_instance_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance show ' + '--name "{myBackupInstance}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupInstances/delete/Delete BackupInstance +@try_manual +def step_backup_instance_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-instance delete -y ' + '--name "{myBackupInstance}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /BackupVaults/delete/Delete BackupVault +@try_manual +def step_backup_vault_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection backup-vault delete -y ' + '--resource-group "{rg}" ' + '--vault-name "swaggerExample"', + checks=checks) + + +# EXAMPLE: /Jobs/get/Get Job +@try_manual +def step_job_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection job show ' + '--job-id "3c60cb49-63e8-4b21-b9bd-26277b3fdfae" ' + '--resource-group "{rg_4}" ' + '--vault-name "BugBashVaultForCCYv11"', + checks=checks) + + +# EXAMPLE: /Jobs/get/Get Jobs +@try_manual +def step_job_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection job list ' + '--resource-group "{rg_4}" ' + '--vault-name "BugBashVaultForCCYv11"', + checks=checks) + + +# EXAMPLE: /RecoveryPoints/get/Get Recovery Point +@try_manual +def step_recovery_point_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection recovery-point show ' + '--backup-instance-name "{myBackupInstance}" ' + '--recovery-point-id "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /RecoveryPoints/get/List Recovery Points in a Vault +@try_manual +def step_recovery_point_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection recovery-point list ' + '--backup-instance-name "{myBackupInstance}" ' + '--resource-group "{rg_2}" ' + '--vault-name "{myBackupVault}"', + checks=checks) + + +# EXAMPLE: /RestorableTimeRanges/post/Find Restorable Time Ranges +@try_manual +def step_restorable_time_range_find(test, checks=None): + if checks is None: + checks = [] + test.cmd('az dataprotection restorable-time-range find ' + '--backup-instances "{myBackupInstance2}" ' + '--end-time "2021-02-24T00:35:17.6829685Z" ' + '--source-data-store-type "OperationalStore" ' + '--start-time "2020-10-17T23:28:17.6829685Z" ' + '--resource-group "{rg_5}" ' + '--vault-name "ZBlobBackupVaultBVTD3"', + checks=checks) diff --git a/src/dataprotection/azext_dataprotection/tests/latest/recordings/test_dataprotection_Scenario.yaml b/src/dataprotection/azext_dataprotection/tests/latest/recordings/test_dataprotection_Scenario.yaml new file mode 100644 index 00000000000..d0f2e18d795 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/latest/recordings/test_dataprotection_Scenario.yaml @@ -0,0 +1,4144 @@ +interactions: +- request: + body: '{"identity": {"type": "SystemAssigned"}, "location": "centraluseuap", "properties": + {"storageSettings": [{"datastoreType": "VaultStore", "type": "LocallyRedundant"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-vault create + Connection: + - keep-alive + Content-Length: + - '167' + Content-Type: + - application/json + ParameterSetName: + - -g --vault-name -l --storage-settings --type + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault?api-version=2021-01-01 + response: + body: + string: '{"location":"centraluseuap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault","name":"cli-test-new-vault","type":"Microsoft.DataProtection/backupVaults","properties":{"provisioningState":"Provisioning","storageSettings":[{"datastoreType":"VaultStore","type":"LocallyRedundant"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2YxOTE5YjNmLTE3MGEtNDJiMS1iZjg4LWE1MmNkZjUxMzcyNQ==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '381' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:10:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '99' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-vault create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -l --storage-settings --type + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2YxOTE5YjNmLTE3MGEtNDJiMS1iZjg4LWE1MmNkZjUxMzcyNQ==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2YxOTE5YjNmLTE3MGEtNDJiMS1iZjg4LWE1MmNkZjUxMzcyNQ==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2YxOTE5YjNmLTE3MGEtNDJiMS1iZjg4LWE1MmNkZjUxMzcyNQ==","status":"Succeeded","startTime":"2021-06-04T09:10:46.6950545Z","endTime":"2021-06-04T09:10:47Z"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:10:56 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-vault create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -l --storage-settings --type + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault?api-version=2021-01-01 + response: + body: + string: '{"location":"centraluseuap","identity":{"type":"SystemAssigned","principalId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault","name":"cli-test-new-vault","type":"Microsoft.DataProtection/backupVaults","properties":{"provisioningState":"Succeeded","storageSettings":[{"datastoreType":"VaultStore","type":"LocallyRedundant"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '518' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:10:57 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-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: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sarath-rg?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg","name":"sarath-rg","type":"Microsoft.Resources/resourceGroups","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '232' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:11:00 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": "centraluseuap", "tags": {}, "sku": {"name": "Premium_LRS"}, + "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": "Empty"}, + "diskSizeGB": 4}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + Content-Length: + - '175' + Content-Type: + - application/json + ParameterSetName: + - -g -n --size-gb + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"cli-test-disk-new\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\"\r\n },\r\n + \ \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": + {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 4,\r\n + \ \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/ed8dc3df-3418-4b84-b059-039966fe9e37?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '332' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:11:02 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/ed8dc3df-3418-4b84-b059-039966fe9e37?monitor=true&api-version=2020-12-01 + 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-ratelimit-remaining-resource: + - Microsoft.Compute/CreateUpdateDisks3Min;999,Microsoft.Compute/CreateUpdateDisks30Min;7999 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/ed8dc3df-3418-4b84-b059-039966fe9e37?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-06-04T09:11:02.3334556+00:00\",\r\n \"endTime\": + \"2021-06-04T09:11:02.5234788+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"cli-test-disk-new\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 4,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"timeCreated\": \"2021-06-04T09:11:02.3384558+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 4294967296,\r\n \"uniqueId\": \"88238bb7-78a5-4854-a200-a97b6d9e3f7d\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P1\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"ed8dc3df-3418-4b84-b059-039966fe9e37\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:11:04 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-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399999 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk create + Connection: + - keep-alive + ParameterSetName: + - -g -n --size-gb + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"cli-test-disk-new\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new\",\r\n + \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"centraluseuap\",\r\n + \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_LRS\",\r\n \"tier\": + \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n + \ \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n + \ \"diskSizeGB\": 4,\r\n \"diskIOPSReadWrite\": 120,\r\n \"diskMBpsReadWrite\": + 25,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n + \ },\r\n \"timeCreated\": \"2021-06-04T09:11:02.3384558+00:00\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n + \ \"diskSizeBytes\": 4294967296,\r\n \"uniqueId\": \"88238bb7-78a5-4854-a200-a97b6d9e3f7d\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P1\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '886' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:11:05 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-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;14999,Microsoft.Compute/LowCostGet30Min;119999 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%273ffa4e46-39a3-4002-9292-e2adf0d1a8c6%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:07 GMT + duration: + - '1913997' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - cTCtbtjwAfyaF2Dp54PET25GCbRLdDGXzEbVhqaf28c= + ocp-aad-session-key: + - 3Z0AQy7PHP2s31dpIsFOtNv9m38DMKqhNxhP-QsgXaS9D-sgIj0Bk99424S5WC9N5ZrJIp_088k8HewPWmqB9laz97ITgYOqZZPW1nfix2Pg0anbTQf99bDnAGmMxhZq.1UNyF7wilzSZnfBFLTg3cFPHNftwpbNCdq5FvZniMjs + pragma: + - no-cache + request-id: + - 70cdaa9e-ff7b-4358-aba2-a6a2558adc34 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["3ffa4e46-39a3-4002-9292-e2adf0d1a8c6"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sarath-rg/providers/Microsoft.DataProtection/BackupVaults/cli-test-new-vault"],"appDisplayName":null,"appId":"4483c997-4ebb-4364-9f74-1d5c36bdf5b2","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"cli-test-new-vault","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"ED75BF57EA48F14E0B6DC332C5768ADCB0E89B1E","endDate":"2021-09-02T09:05:00Z","keyId":"8c25d282-1ac0-4990-a520-48615fb71b00","startDate":"2021-06-04T09:05:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["4483c997-4ebb-4364-9f74-1d5c36bdf5b2","https://identity.azure.net/yHvRErNNmOMZ4EezrAqFKc6Ca0cDdhCvjeK23cGv1hE="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1576' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:07 GMT + duration: + - '1491971' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 4D77M8h89EN27tZd+qUEwdo/h1swGVNrN4mFaYNXh2k= + ocp-aad-session-key: + - LjxQABPoK1xJ0aECTNobP9ohIT2u4swS14Goc54p_qc0ptNq0jK6XdyHoQgkv6ETmYHxYo6ZTOG3ktw4Ou6HU5sEaHG4Kyq7C4fP5dr4eWyMLfhNM8GBwzDA_7MRAnYW.hEyr72thPzWVnvwukgR5y1r5m9IdTYPZYoEjzWHz-R4 + pragma: + - no-cache + request-id: + - 5db4769e-cc69-4b63-bcdc-6bfd2a109ff5 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Disk%20Backup%20Reader%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Disk Backup Reader","type":"BuiltInRole","description":"Provides + permission to backup vault to perform disk backup.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Compute/disks/read","Microsoft.Compute/disks/beginGetAccess/action"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2020-12-15T07:39:03.8394514Z","updatedOn":"2020-12-18T05:00:23.3015246Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3e5e47e6-65f7-47ef-90b5-e5dd4d455f24","type":"Microsoft.Authorization/roleDefinitions","name":"3e5e47e6-65f7-47ef-90b5-e5dd4d455f24"}]}' + headers: + cache-control: + - no-cache + content-length: + - '738' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:09 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3e5e47e6-65f7-47ef-90b5-e5dd4d455f24", + "principalId": "3ffa4e46-39a3-4002-9292-e2adf0d1a8c6", "principalType": "ServicePrincipal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '270' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new/providers/Microsoft.Authorization/roleAssignments/bf9cf173-8842-4660-a12a-754b51012181?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3e5e47e6-65f7-47ef-90b5-e5dd4d455f24","principalId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","condition":null,"conditionVersion":null,"createdOn":"2021-06-04T09:14:10.2192848Z","updatedOn":"2021-06-04T09:14:10.8243103Z","createdBy":null,"updatedBy":"8bb5b214-1182-465c-892f-ca7235abe1e7","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new/providers/Microsoft.Authorization/roleAssignments/bf9cf173-8842-4660-a12a-754b51012181","type":"Microsoft.Authorization/roleAssignments","name":"bf9cf173-8842-4660-a12a-754b51012181"}' + headers: + cache-control: + - no-cache + content-length: + - '977' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:11 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%273ffa4e46-39a3-4002-9292-e2adf0d1a8c6%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:12 GMT + duration: + - '1253177' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - GZj9CpfhZHdya9Hwx2ZvEql4ER4crk1MbDGMcacs7oc= + ocp-aad-session-key: + - l0gmaC-ERLpTTeW1bLL4Yj58pUmC8SmoYV6BE_ySCslmoHEMdTsSejGmOeXelWOAR6Q1nsKbSkKyj_roqBe56ZhIWw22bFG32iVl7LMgYo7oQ18ecjjnmLnFnF3Cj0Zi.U3zuPiJDI86oD_f7akC9CUM3rLAfesx5OAGMaTVnhUk + pragma: + - no-cache + request-id: + - 5cd5982f-881e-4c68-8d0b-2ad6bd64b467 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["3ffa4e46-39a3-4002-9292-e2adf0d1a8c6"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sarath-rg/providers/Microsoft.DataProtection/BackupVaults/cli-test-new-vault"],"appDisplayName":null,"appId":"4483c997-4ebb-4364-9f74-1d5c36bdf5b2","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"cli-test-new-vault","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"ED75BF57EA48F14E0B6DC332C5768ADCB0E89B1E","endDate":"2021-09-02T09:05:00Z","keyId":"8c25d282-1ac0-4990-a520-48615fb71b00","startDate":"2021-06-04T09:05:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["4483c997-4ebb-4364-9f74-1d5c36bdf5b2","https://identity.azure.net/yHvRErNNmOMZ4EezrAqFKc6Ca0cDdhCvjeK23cGv1hE="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1576' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:12 GMT + duration: + - '1320635' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - SFhN1KNQZ3fBbVQ9Ikbds+omSwdNlpbAB6xws1mWsbM= + ocp-aad-session-key: + - 7OKW62INiN464olBk8b_-7QYeeteqytTaypt1yzUkqQCed67RkDzjD1mFbENC1GXPKpOV7VWE4veCjc_JLplQNFcDjJYkHwNG30Cjzsa4EUuueNR6qOKWDA61pmg06oT.DEBQOI_k9Kg7Of6KKIbiPZZ0J5_V5vA5EhmteARuzPI + pragma: + - no-cache + request-id: + - e5214895-ea90-4b8a-bd47-6b1b7bc461ce + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Disk%20Snapshot%20Contributor%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Disk Snapshot Contributor","type":"BuiltInRole","description":"Provides + permission to backup vault to manage disk snapshots.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Compute/snapshots/delete","Microsoft.Compute/snapshots/write","Microsoft.Compute/snapshots/read","Microsoft.Compute/snapshots/beginGetAccess/action","Microsoft.Compute/snapshots/endGetAccess/action","Microsoft.Compute/disks/beginGetAccess/action","Microsoft.Storage/storageAccounts/listkeys/action","Microsoft.Storage/storageAccounts/write","Microsoft.Storage/storageAccounts/read","Microsoft.Storage/storageAccounts/delete"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2020-12-15T12:18:51.4471411Z","updatedOn":"2021-01-06T04:00:07.5681241Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7efff54f-a5b4-42b5-a1c5-5411624893ce","type":"Microsoft.Authorization/roleDefinitions","name":"7efff54f-a5b4-42b5-a1c5-5411624893ce"}]}' + headers: + cache-control: + - no-cache + content-length: + - '1160' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:14 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7efff54f-a5b4-42b5-a1c5-5411624893ce", + "principalId": "3ffa4e46-39a3-4002-9292-e2adf0d1a8c6", "principalType": "ServicePrincipal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '270' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleAssignments/094981c0-d59c-4f5b-9581-72c08da65454?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7efff54f-a5b4-42b5-a1c5-5411624893ce","principalId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg","condition":null,"conditionVersion":null,"createdOn":"2021-06-04T09:14:14.8183053Z","updatedOn":"2021-06-04T09:14:15.2033628Z","createdBy":null,"updatedBy":"8bb5b214-1182-465c-892f-ca7235abe1e7","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleAssignments/094981c0-d59c-4f5b-9581-72c08da65454","type":"Microsoft.Authorization/roleAssignments","name":"094981c0-d59c-4f5b-9581-72c08da65454"}' + headers: + cache-control: + - no-cache + content-length: + - '873' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:16 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%273ffa4e46-39a3-4002-9292-e2adf0d1a8c6%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:17 GMT + duration: + - '1207009' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 0/a99WubKqRPdLY8IfmwZcwb+j/za1xUbXw38Bw4UwE= + ocp-aad-session-key: + - ZDIosz4ntFxfC-kX0MfbOC_VGMQbBnAVJEp0BwYFVJOLPKZvU4PM0T-2LTGTO6xl9z6FZsnFp-Jr89OOjWMbD2ky4_fj-YRmTxNxqROSP849ht1e9y1eIH0gR6B8-oS2.KnFpa2yAT4dK_Tvfl4RXEYG_uSB8GCBYEdGjM7Q7Om8 + pragma: + - no-cache + request-id: + - 40cda17d-9f43-4722-be39-eb29ee89f478 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["3ffa4e46-39a3-4002-9292-e2adf0d1a8c6"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":["isExplicit=False","/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sarath-rg/providers/Microsoft.DataProtection/BackupVaults/cli-test-new-vault"],"appDisplayName":null,"appId":"4483c997-4ebb-4364-9f74-1d5c36bdf5b2","applicationTemplateId":null,"appOwnerTenantId":null,"appRoleAssignmentRequired":false,"appRoles":[],"displayName":"cli-test-new-vault","errorUrl":null,"homepage":null,"informationalUrls":null,"keyCredentials":[{"customKeyIdentifier":"ED75BF57EA48F14E0B6DC332C5768ADCB0E89B1E","endDate":"2021-09-02T09:05:00Z","keyId":"8c25d282-1ac0-4990-a520-48615fb71b00","startDate":"2021-06-04T09:05:00Z","type":"AsymmetricX509Cert","usage":"Verify","value":null}],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":null,"replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["4483c997-4ebb-4364-9f74-1d5c36bdf5b2","https://identity.azure.net/yHvRErNNmOMZ4EezrAqFKc6Ca0cDdhCvjeK23cGv1hE="],"servicePrincipalType":"ManagedIdentity","signInAudience":null,"tags":[],"tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1576' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Fri, 04 Jun 2021 09:14:17 GMT + duration: + - '1314377' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - g2VY479Xo+M/xEsugHXizKpr4THEkUcIyyZMthJkYIQ= + ocp-aad-session-key: + - DZ9kDmzviKuCSnBDRqhODBu3933EUDFAVNj5flj-NGDjlaUFFft3CN-90nMLO0q2CgpH6dOixEilb3ML-vBnwrUwzDPiLq2a3HoPdrdnMSYHABnR0UbAUdfI0Wx_tFIH.RcoPCFlMkW_3D5R9WLOQsZ11wTlkH_re62z4Nt9KO-8 + pragma: + - no-cache + request-id: + - d54190cc-5e80-4d80-9805-89486050a581 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Disk%20Restore%20Operator%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Disk Restore Operator","type":"BuiltInRole","description":"Provides + permission to backup vault to perform disk restore.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Compute/disks/write","Microsoft.Compute/disks/read"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2020-12-15T12:18:31.8481619Z","updatedOn":"2020-12-18T05:00:53.9562743Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b50d9833-a0cb-478e-945f-707fcc997c13","type":"Microsoft.Authorization/roleDefinitions","name":"b50d9833-a0cb-478e-945f-707fcc997c13"}]}' + headers: + cache-control: + - no-cache + content-length: + - '782' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:17 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b50d9833-a0cb-478e-945f-707fcc997c13", + "principalId": "3ffa4e46-39a3-4002-9292-e2adf0d1a8c6", "principalType": "ServicePrincipal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '270' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --assignee --role --scope + User-Agent: + - python/3.9.0 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.2 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleAssignments/0cac59e0-0464-4bf6-9bef-f1fadc2b08f4?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b50d9833-a0cb-478e-945f-707fcc997c13","principalId":"3ffa4e46-39a3-4002-9292-e2adf0d1a8c6","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg","condition":null,"conditionVersion":null,"createdOn":"2021-06-04T09:14:19.1704421Z","updatedOn":"2021-06-04T09:14:19.9004430Z","createdBy":null,"updatedBy":"8bb5b214-1182-465c-892f-ca7235abe1e7","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Authorization/roleAssignments/0cac59e0-0464-4bf6-9bef-f1fadc2b08f4","type":"Microsoft.Authorization/roleAssignments","name":"0cac59e0-0464-4bf6-9bef-f1fadc2b08f4"}' + headers: + cache-control: + - no-cache + content-length: + - '873' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:14:21 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: '{"properties": {"datasourceTypes": ["Microsoft.Compute/disks"], "objectType": + "BackupPolicy", "policyRules": [{"name": "BackupHourly", "objectType": "AzureBackupRule", + "backupParameters": {"objectType": "AzureBackupParams", "backupType": "Incremental"}, + "dataStore": {"dataStoreType": "OperationalStore", "objectType": "DataStoreInfoBase"}, + "trigger": {"objectType": "ScheduleBasedTriggerContext", "schedule": {"repeatingTimeIntervals": + ["R/2020-04-05T13:00:00+00:00/PT4H"]}, "taggingCriteria": [{"isDefault": true, + "taggingPriority": 99, "tagInfo": {"tagName": "Default"}}]}}, {"name": "Default", + "objectType": "AzureRetentionRule", "isDefault": true, "lifecycles": [{"deleteAfter": + {"duration": "P7D", "objectType": "AbsoluteDeleteOption"}, "sourceDataStore": + {"dataStoreType": "OperationalStore", "objectType": "DataStoreInfoBase"}}]}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-policy create + Connection: + - keep-alive + Content-Length: + - '840' + Content-Type: + - application/json + ParameterSetName: + - -n --policy -g --vault-name + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","name":"diskpolicy","type":"Microsoft.DataProtection/backupVaults/backupPolicies","properties":{"policyRules":[{"backupParameters":{"backupType":"Incremental","objectType":"AzureBackupParams"},"trigger":{"schedule":{"repeatingTimeIntervals":["R/2020-04-05T13:00:00+00:00/PT4H"]},"taggingCriteria":[{"tagInfo":{"tagName":"Default","id":"Default_"},"taggingPriority":99,"isDefault":true}],"objectType":"ScheduleBasedTriggerContext"},"dataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"},"name":"BackupHourly","objectType":"AzureBackupRule"},{"lifecycles":[{"deleteAfter":{"objectType":"AbsoluteDeleteOption","duration":"P7D"},"sourceDataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"}}],"isDefault":true,"name":"Default","objectType":"AzureRetentionRule"}],"datasourceTypes":["Microsoft.Compute/disks"],"objectType":"BackupPolicy"}}' + headers: + cache-control: + - no-cache + content-length: + - '1065' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:22 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-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-policy show + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --query + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","name":"diskpolicy","type":"Microsoft.DataProtection/backupVaults/backupPolicies","properties":{"policyRules":[{"backupParameters":{"backupType":"Incremental","objectType":"AzureBackupParams"},"trigger":{"schedule":{"repeatingTimeIntervals":["R/2020-04-05T13:00:00+00:00/PT4H"]},"taggingCriteria":[{"tagInfo":{"tagName":"Default","id":"Default_"},"taggingPriority":99,"isDefault":true}],"objectType":"ScheduleBasedTriggerContext"},"dataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"},"name":"BackupHourly","objectType":"AzureBackupRule"},{"lifecycles":[{"deleteAfter":{"objectType":"AbsoluteDeleteOption","duration":"P7D"},"sourceDataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"}}],"isDefault":true,"name":"Default","objectType":"AzureRetentionRule"}],"datasourceTypes":["Microsoft.Compute/disks"],"objectType":"BackupPolicy"}}' + headers: + cache-control: + - no-cache + content-length: + - '1065' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:25 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"datasourceTypes": ["Microsoft.Compute/disks"], "objectType": + "BackupPolicy", "policyRules": [{"name": "BackupHourly", "objectType": "AzureBackupRule", + "backupParameters": {"objectType": "AzureBackupParams", "backupType": "Incremental"}, + "dataStore": {"dataStoreType": "OperationalStore", "objectType": "DataStoreInfoBase"}, + "trigger": {"objectType": "ScheduleBasedTriggerContext", "schedule": {"repeatingTimeIntervals": + ["R/2021-05-02T05:30:00+00:00/PT6H"]}, "taggingCriteria": [{"isDefault": true, + "taggingPriority": 99, "tagInfo": {"tagName": "Default"}}, {"criteria": [{"objectType": + "ScheduleBasedBackupCriteria", "absoluteCriteria": ["FirstOfDay"]}], "isDefault": + false, "taggingPriority": 25, "tagInfo": {"tagName": "Daily"}}]}}, {"name": + "Default", "objectType": "AzureRetentionRule", "isDefault": true, "lifecycles": + [{"deleteAfter": {"duration": "P7D", "objectType": "AbsoluteDeleteOption"}, + "sourceDataStore": {"dataStoreType": "OperationalStore", "objectType": "DataStoreInfoBase"}}]}, + {"name": "Daily", "objectType": "AzureRetentionRule", "isDefault": false, "lifecycles": + [{"deleteAfter": {"duration": "P12D", "objectType": "AbsoluteDeleteOption"}, + "sourceDataStore": {"dataStoreType": "OperationalStore", "objectType": "DataStoreInfoBase"}}]}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-policy create + Connection: + - keep-alive + Content-Length: + - '1276' + Content-Type: + - application/json + ParameterSetName: + - -n --policy -g --vault-name + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskhourlypolicy?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskhourlypolicy","name":"diskhourlypolicy","type":"Microsoft.DataProtection/backupVaults/backupPolicies","properties":{"policyRules":[{"backupParameters":{"backupType":"Incremental","objectType":"AzureBackupParams"},"trigger":{"schedule":{"repeatingTimeIntervals":["R/2021-05-02T05:30:00+00:00/PT6H"]},"taggingCriteria":[{"tagInfo":{"tagName":"Default","id":"Default_"},"taggingPriority":99,"isDefault":true},{"tagInfo":{"tagName":"Daily","id":"Daily_"},"taggingPriority":25,"isDefault":false,"criteria":[{"absoluteCriteria":["FirstOfDay"],"objectType":"ScheduleBasedBackupCriteria"}]}],"objectType":"ScheduleBasedTriggerContext"},"dataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"},"name":"BackupHourly","objectType":"AzureBackupRule"},{"lifecycles":[{"deleteAfter":{"objectType":"AbsoluteDeleteOption","duration":"P7D"},"sourceDataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"}}],"isDefault":true,"name":"Default","objectType":"AzureRetentionRule"},{"lifecycles":[{"deleteAfter":{"objectType":"AbsoluteDeleteOption","duration":"P12D"},"sourceDataStore":{"dataStoreType":"OperationalStore","objectType":"DataStoreInfoBase"}}],"isDefault":false,"name":"Daily","objectType":"AzureRetentionRule"}],"datasourceTypes":["Microsoft.Compute/disks"],"objectType":"BackupPolicy"}}' + headers: + cache-control: + - no-cache + content-length: + - '1498' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:28 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-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"backupInstance": {"dataSourceInfo": {"datasourceType": "Microsoft.Compute/disks", + "objectType": "Datasource", "resourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new", + "resourceLocation": "centraluseuap", "resourceName": "cli-test-disk-new", "resourceType": + "Microsoft.Compute/disks", "resourceUri": ""}, "policyInfo": {"policyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy", + "policyParameters": {"dataStoreParametersList": [{"objectType": "AzureOperationalStoreParameters", + "dataStoreType": "OperationalStore", "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg"}]}}, + "objectType": "BackupInstance"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + Content-Length: + - '866' + Content-Type: + - application/json + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/validateForBackup?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:14:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: '{"properties": {"dataSourceInfo": {"datasourceType": "Microsoft.Compute/disks", + "objectType": "Datasource", "resourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new", + "resourceLocation": "centraluseuap", "resourceName": "cli-test-disk-new", "resourceType": + "Microsoft.Compute/disks", "resourceUri": ""}, "policyInfo": {"policyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy", + "policyParameters": {"dataStoreParametersList": [{"objectType": "AzureOperationalStoreParameters", + "dataStoreType": "OperationalStore", "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg"}]}}, + "objectType": "BackupInstance"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + Content-Length: + - '862' + Content-Type: + - application/json + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","name":"cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","type":"Microsoft.DataProtection/backupVaults/backupInstances","properties":{"friendlyName":"cli-test-disk-new","dataSourceInfo":{"resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","resourceUri":"","datasourceType":"Microsoft.Compute/disks","resourceName":"cli-test-disk-new","resourceType":"Microsoft.Compute/disks","resourceLocation":"centraluseuap","objectType":"Datasource"},"policyInfo":{"policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","policyParameters":{"dataStoreParametersList":[{"objectType":"AzureOperationalStoreParameters","dataStoreType":"OperationalStore","resourceGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg"}]}},"protectionStatus":{"status":"ConfiguringProtection"},"currentProtectionState":"ConfiguringProtection","provisioningState":"Provisioning","objectType":"BackupInstance"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '1392' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==","status":"Inprogress","startTime":"2021-06-04T09:14:31.4605063Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:41 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","status":"Inprogress","startTime":"2021-06-04T09:14:32.31748Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '441' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:14:47 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==","status":"Succeeded","startTime":"2021-06-04T09:14:31.4605063Z","endTime":"2021-06-04T09:14:52Z"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + response: + body: + string: '{"objectType":"OperationJobExtendedInfo"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2I2MTFkYzdkLTBiYmMtNGZlZi05NWY5LTAyMWE4ZTAyYTJmMg==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '41' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","status":"Inprogress","startTime":"2021-06-04T09:14:32.31748Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '441' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15:17 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2ZmOTMxZDljLWVmYTYtNGY4MS1iMzM3LTE3OWRjNGFmNWM1Nw==","status":"Succeeded","startTime":"2021-06-04T09:14:32.31748Z","endTime":"2021-06-04T09:15:18Z"}' + headers: + cache-control: + - no-cache + content-length: + - '441' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15:47 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance create + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --backup-instance + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","name":"cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","type":"Microsoft.DataProtection/backupVaults/backupInstances","properties":{"friendlyName":"cli-test-disk-new","dataSourceInfo":{"resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","resourceUri":"","datasourceType":"Microsoft.Compute/disks","resourceName":"cli-test-disk-new","resourceType":"Microsoft.Compute/disks","resourceLocation":"centraluseuap","objectType":"Datasource"},"policyInfo":{"policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","policyParameters":{"dataStoreParametersList":[{"objectType":"AzureOperationalStoreParameters","dataStoreType":"OperationalStore","resourceGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg"}]}},"protectionStatus":{"status":"ProtectionConfigured"},"currentProtectionState":"ProtectionConfigured","provisioningState":"Succeeded","objectType":"BackupInstance"}}' + headers: + cache-control: + - no-cache + content-length: + - '1387' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15:48 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-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: + - dataprotection backup-instance list + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name --query + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances?api-version=2021-01-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","name":"cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","type":"Microsoft.DataProtection/backupVaults/backupInstances","properties":{"friendlyName":"cli-test-disk-new","dataSourceInfo":{"resourceID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","resourceUri":"","datasourceType":"Microsoft.Compute/disks","resourceName":"cli-test-disk-new","resourceType":"Microsoft.Compute/disks","resourceLocation":"centraluseuap","objectType":"Datasource"},"policyInfo":{"policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","policyParameters":{"dataStoreParametersList":[{"objectType":"AzureOperationalStoreParameters","dataStoreType":"OperationalStore","resourceGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg"}]}},"protectionStatus":{"status":"ProtectionConfigured"},"currentProtectionState":"ProtectionConfigured","provisioningState":"Succeeded","objectType":"BackupInstance"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1399' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:15:49 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"backupRuleOptions": {"ruleName": "BackupHourly", "triggerOption": {"retentionTagOverride": + "Default"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance adhoc-backup + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + ParameterSetName: + - -n -g --vault-name --rule-name --retention-tag-override + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae/backup?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:16:22 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance adhoc-backup + Connection: + - keep-alive + ParameterSetName: + - -n -g --vault-name --rule-name --retention-tag-override + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==","status":"Succeeded","startTime":"2021-06-04T09:16:22.9408184Z","endTime":"2021-06-04T09:16:26Z","properties":{"jobId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","objectType":"OperationJobExtendedInfo"}}' + headers: + cache-control: + - no-cache + content-length: + - '700' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:16:53 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance adhoc-backup + Connection: + - keep-alive + ParameterSetName: + - -n -g --vault-name --rule-name --retention-tag-override + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==?api-version=2021-01-01 + response: + body: + string: '{"jobId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","objectType":"OperationJobExtendedInfo"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0O2U3ZjQ4MGRhLTRjZDEtNDA0My1iZTQzLTM2ODI5YmZlNjQwNA==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:16:53 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-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: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:17:05 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:17:18 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:17:30 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:17:42 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:17:53 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:18:05 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:18:17 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:18:30 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:18:42 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A16%3A25.3218962Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"InProgress"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1737' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:18:53 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"860fac73-c515-11eb-bd1e-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","destinationDataStoreName":"OperationalTierStore","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A18%3A58.6780244Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:16:23.1456747Z","endTime":"2021-06-04T09:18:58.0840741Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Backup","operation":"Backup","status":"Completed","isUserTriggered":true,"supportedActions":[""],"duration":"PT2M34.9383994S","extendedInfo":{"targetRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"0001-01-01T00:00:00"},"subTasks":[{"taskId":1,"taskName":"Trigger + Backup","taskStatus":"Completed"}],"additionalDetails":{"RetentionTag":"Default"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/a0bbc110-3f37-47d0-92bf-0587c8995fec","name":"a0bbc110-3f37-47d0-92bf-0587c8995fec","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1955' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:19:05 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection recovery-point list + Connection: + - keep-alive + ParameterSetName: + - --backup-instance-name -g --vault-name + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae/recoveryPoints?api-version=2021-01-01&$filter= + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae/recoveryPoints/7615da22f44b40609e2c9aebeecb7793","name":"7615da22f44b40609e2c9aebeecb7793","type":"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints","properties":{"objectType":"AzureBackupDiscreteRecoveryPoint","recoveryPointId":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.9023130Z","recoveryPointType":"Incremental","friendlyName":"6d6f751e-4b68-48c9-a977-e22e3633b338","recoveryPointDataStoresDetails":[{"id":"ca0228e9-927f-4933-b2bf-0973a39c7310","type":"OperationalStore","creationTime":"2021-06-04T09:18:13.9023130Z","expiryTime":null,"metaData":null,"visible":true,"state":"COMMITTED","rehydrationExpiryTime":null,"rehydrationStatus":null}],"retentionTagName":"Default","retentionTagVersion":"637583948720425019","policyName":"diskpolicy","policyVersion":null}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1071' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:19:07 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"restoreRequestObject": {"objectType": "AzureBackupRecoveryPointBasedRestoreRequest", + "restoreTargetInfo": {"objectType": "RestoreTargetInfo", "recoveryOption": "FailIfExists", + "restoreLocation": "centraluseuap", "datasourceInfo": {"datasourceType": "Microsoft.Compute/disks", + "objectType": "Datasource", "resourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored", + "resourceLocation": "centraluseuap", "resourceName": "cli-test-disk-new-restored", + "resourceType": "Microsoft.Compute/disks", "resourceUri": ""}}, "sourceDataStoreType": + "OperationalStore", "recoveryPointId": "7615da22f44b40609e2c9aebeecb7793"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance validate-for-restore + Connection: + - keep-alive + Content-Length: + - '706' + Content-Type: + - application/json + ParameterSetName: + - -g --vault-name -n --restore-request-object + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae/validateRestore?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:19:09 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance validate-for-restore + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --restore-request-object + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==","status":"Inprogress","startTime":"2021-06-04T09:19:09.8928375Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:19:20 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance validate-for-restore + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --restore-request-object + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==","status":"Succeeded","startTime":"2021-06-04T09:19:09.8928375Z","endTime":"2021-06-04T09:19:42Z"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:19:50 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance validate-for-restore + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --restore-request-object + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + response: + body: + string: '{"objectType":"OperationJobExtendedInfo"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzliOTNiMWY4LWU3OWEtNDY5ZS1hNDQ3LTdiYzRiNTllNzczZA==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '41' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:19:51 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectType": "AzureBackupRecoveryPointBasedRestoreRequest", "restoreTargetInfo": + {"objectType": "RestoreTargetInfo", "recoveryOption": "FailIfExists", "restoreLocation": + "centraluseuap", "datasourceInfo": {"datasourceType": "Microsoft.Compute/disks", + "objectType": "Datasource", "resourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored", + "resourceLocation": "centraluseuap", "resourceName": "cli-test-disk-new-restored", + "resourceType": "Microsoft.Compute/disks", "resourceUri": ""}}, "sourceDataStoreType": + "OperationalStore", "recoveryPointId": "7615da22f44b40609e2c9aebeecb7793"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance restore trigger + Connection: + - keep-alive + Content-Length: + - '680' + Content-Type: + - application/json + ParameterSetName: + - -g --vault-name -n --parameters + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae/restore?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:19:53 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance restore trigger + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --parameters + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==","status":"Succeeded","startTime":"2021-06-04T09:19:53.5329182Z","endTime":"2021-06-04T09:19:55Z","properties":{"jobId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","objectType":"OperationJobExtendedInfo"}}' + headers: + cache-control: + - no-cache + content-length: + - '700' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:20:23 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance restore trigger + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --parameters + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==?api-version=2021-01-01 + response: + body: + string: '{"jobId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","objectType":"OperationJobExtendedInfo"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzI2Zjg1YTVlLWY0NjYtNGU1Yy1hZDNlLTM2ZjE3OTg3OWY0Yw==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:20:23 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-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: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:20:36 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:20:48 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:21:01 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:21: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:21:25 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:21:37 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:21:49 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:22:01 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:22: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:22:24 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:22:36 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:22:48 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:23:01 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:23: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A19%3A54.2022097Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"InProgress","isUserTriggered":true,"supportedActions":[""],"duration":"PT0S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"InProgress"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '1981' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:23:24 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection job show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3?api-version=2021-01-01 + response: + body: + string: '{"properties":{"activityID":"03c5c576-c516-11eb-8928-9cfce85d4fae","subscriptionId":"38304e13-357e-405e-9e9a-220351dcce8c","backupInstanceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae","policyId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupPolicies/diskpolicy","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new","vaultName":"cli-test-new-vault","backupInstanceFriendlyName":"cli-test-disk-new","policyName":"diskpolicy","sourceResourceGroup":"sarath-rg","dataSourceName":"cli-test-disk-new","progressEnabled":false,"etag":"W/\"datetime''2021-06-04T09%3A23%3A27.4539975Z''\"","sourceSubscriptionID":"38304e13-357e-405e-9e9a-220351dcce8c","dataSourceLocation":"centraluseuap","startTime":"2021-06-04T09:19:53.9105035Z","endTime":"2021-06-04T09:23:26.8745814Z","dataSourceType":"Microsoft.Compute/disks","operationCategory":"Restore","operation":"Restore","status":"Completed","isUserTriggered":true,"supportedActions":[""],"duration":"PT3M32.9640779S","extendedInfo":{"sourceRecoverPoint":{"recoveryPointID":"7615da22f44b40609e2c9aebeecb7793","recoveryPointTime":"2021-06-04T09:18:13.902313Z"},"recoveryDestination":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored","subTasks":[{"taskId":1,"taskName":"Trigger + Restore","taskStatus":"Completed"}]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupJobs/7e346080-681f-4508-af40-bfbd4c0c0db3","name":"7e346080-681f-4508-af40-bfbd4c0c0db3","type":"Microsoft.DataProtection/backupVaults/backupJobs"}' + headers: + cache-control: + - no-cache + content-length: + - '2031' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:23:37 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --vault-name -n --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault/backupInstances/cli-test-disk-new-cli-test-disk-new-b7e6f082-b310-11eb-8f55-9cfce85d4fae?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:23:40 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance delete + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","status":"Inprogress","startTime":"2021-06-04T09:23:40.4108792Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:24: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance delete + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","status":"Inprogress","startTime":"2021-06-04T09:23:40.4108792Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:24:41 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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance delete + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","status":"Inprogress","startTime":"2021-06-04T09:23:40.4108792Z","endTime":"0001-01-01T00:00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:25: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-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - dataprotection backup-instance delete + Connection: + - keep-alive + ParameterSetName: + - -g --vault-name -n --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","name":"ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzMzYWY3Mzc4LTUxNzctNDcwZS05MDMxLTgzNTAyYjc0YWZlOQ==","status":"Succeeded","startTime":"2021-06-04T09:23:40.4108792Z","endTime":"2021-06-04T09:25:24Z"}' + headers: + cache-control: + - no-cache + content-length: + - '443' + content-type: + - application/json + date: + - Fri, 04 Jun 2021 09:25:42 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-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: + - dataprotection backup-vault delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --vault-name --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-dataprotectionclient/unknown Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.DataProtection/backupVaults/cli-test-new-vault?api-version=2021-01-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationStatus/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzYyZTg4ODNkLWQxY2ItNGIxNC04NGVjLWY0Y2Y4ZGJiNjE4MQ==?api-version=2021-01-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:25:43 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataProtection/locations/centraluseuap/operationResults/ZWU4ZmQ2YWEtMWZmNy00OTcxLTllMGMtMTM3MjA2OTE0ZDI0OzYyZTg4ODNkLWQxY2ItNGIxNC04NGVjLWY0Y2Y4ZGJiNjE4MQ==?api-version=2021-01-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '99' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new?api-version=2020-12-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e402d90e-35bf-476e-80b4-66a6815f6aba?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:25:46 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e402d90e-35bf-476e-80b4-66a6815f6aba?monitor=true&api-version=2020-12-01 + 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-ratelimit-remaining-resource: + - Microsoft.Compute/DeleteDisks3Min;2998,Microsoft.Compute/DeleteDisks30Min;23998 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e402d90e-35bf-476e-80b4-66a6815f6aba?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-06-04T09:25:46.2047919+00:00\",\r\n \"endTime\": + \"2021-06-04T09:25:46.5047945+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"e402d90e-35bf-476e-80b4-66a6815f6aba\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:26:15 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-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49996,Microsoft.Compute/GetOperation30Min;399985 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sarath-rg/providers/Microsoft.Compute/disks/cli-test-disk-new-restored?api-version=2020-12-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e411dad4-2df5-4449-9db2-cb2718c96a1a?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 04 Jun 2021 09:26:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e411dad4-2df5-4449-9db2-cb2718c96a1a?monitor=true&api-version=2020-12-01 + 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-ratelimit-remaining-resource: + - Microsoft.Compute/DeleteDisks3Min;2997,Microsoft.Compute/DeleteDisks30Min;23997 + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk delete + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --yes + User-Agent: + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.9.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/centraluseuap/DiskOperations/e411dad4-2df5-4449-9db2-cb2718c96a1a?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-06-04T09:26:19.1879037+00:00\",\r\n \"endTime\": + \"2021-06-04T09:26:19.46293+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": + \"e411dad4-2df5-4449-9db2-cb2718c96a1a\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '182' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 09:26:49 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-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;49995,Microsoft.Compute/GetOperation30Min;399984 + status: + code: 200 + message: OK +version: 1 diff --git a/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario.py b/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario.py new file mode 100644 index 00000000000..f8fdffbeb70 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario.py @@ -0,0 +1,138 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer +from .example_steps import step_backup_policy_create +from .example_steps import step_backup_policy_show +from .example_steps import step_backup_policy_list +from .example_steps import step_backup_instance_create +from .example_steps import step_backup_instance_list +from .example_steps import step_backup_instance_adhoc_backup +from .example_steps import step_backup_instance_restore_trigger +from .example_steps import step_backup_instance_restore_trigger2 +from .example_steps import step_backup_instance_restore_trigger3 +from .example_steps import step_backup_instance_validate_for_backup +from .example_steps import step_backup_instance_validate_for_restore +from .example_steps import step_backup_policy_delete +from .example_steps import step_backup_vault_create +from .example_steps import step_backup_vault_create2 +from .example_steps import step_backup_vault_show +from .example_steps import step_backup_vault_show2 +from .example_steps import step_backup_vault_update +from .example_steps import step_backup_instance_show +from .example_steps import step_backup_instance_delete +from .example_steps import step_backup_vault_delete +from .example_steps import step_job_show +from .example_steps import step_job_list +from .example_steps import step_recovery_point_show +from .example_steps import step_recovery_point_list +from .example_steps import step_restorable_time_range_find +from .. import ( + try_manual, + raise_if, + calc_coverage +) + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +# Env setup_scenario +@try_manual +def setup_scenario(test): + pass + + +# Env cleanup_scenario +@try_manual +def cleanup_scenario(test): + pass + + +# Testcase: Scenario +@try_manual +def call_scenario(test): + setup_scenario(test) + step_backup_policy_create(test, checks=[ + test.check("name", "{myBackupPolicy}", case_sensitive=False), + ]) + step_backup_policy_show(test, checks=[ + test.check("name", "{myBackupPolicy}", case_sensitive=False), + ]) + step_backup_policy_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_backup_instance_create(test, checks=[ + test.check("friendlyName", "harshitbi2", case_sensitive=False), + test.check("objectType", "BackupInstance", case_sensitive=False), + test.check("policyInfo.policyId", "/subscriptions/{subscription_id}/resourceGroups/{rg_2}/providers/Microsoft.D" + "ataProtection/Backupvaults/{myBackupVault}/backupPolicies/{myBackupPolicy2}", + case_sensitive=False), + test.check("policyInfo.policyParameters.dataStoreParametersList[0].dataStoreType", "OperationalStore", + case_sensitive=False), + test.check("policyInfo.policyParameters.dataStoreParametersList[0].objectType", + "AzureOperationalStoreParameters", case_sensitive=False), + test.check("policyInfo.policyParameters.dataStoreParametersList[0].resourceGroupId", + "/subscriptions/{subscription_id}/resourceGroups/{rg_3}", case_sensitive=False), + ]) + step_backup_instance_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_backup_instance_adhoc_backup(test, checks=[]) + step_backup_instance_restore_trigger(test, checks=[]) + step_backup_instance_restore_trigger2(test, checks=[]) + step_backup_instance_restore_trigger3(test, checks=[]) + step_backup_instance_validate_for_backup(test, checks=[]) + step_backup_instance_validate_for_restore(test, checks=[]) + step_backup_policy_delete(test, checks=[]) + step_backup_vault_create(test, checks=[]) + step_backup_vault_create2(test, checks=[]) + step_backup_vault_show(test, checks=[]) + step_backup_vault_show2(test, checks=[]) + step_backup_vault_update(test, checks=[]) + step_backup_instance_show(test, checks=[]) + step_backup_instance_delete(test, checks=[]) + step_backup_vault_delete(test, checks=[]) + step_job_show(test, checks=[]) + step_job_list(test, checks=[]) + step_recovery_point_show(test, checks=[]) + step_recovery_point_list(test, checks=[]) + step_restorable_time_range_find(test, checks=[]) + cleanup_scenario(test) + + +# Test class for Scenario +@try_manual +class DataprotectionScenarioTest(ScenarioTest): + def __init__(self, *args, **kwargs): + super(DataprotectionScenarioTest, self).__init__(*args, **kwargs) + self.kwargs.update({ + 'subscription_id': self.get_subscription_id() + }) + + self.kwargs.update({ + 'myBackupVault': 'PratikPrivatePreviewVault1', + 'myBackupPolicy2': 'PratikPolicy1', + 'myBackupPolicy': 'OSSDBPolicy', + 'myBackupInstance': 'testInstance1', + 'myBackupInstance2': 'zblobbackuptestsa58', + }) + + @ResourceGroupPreparer(name_prefix='clitestdataprotection_viveksipgtest'[:7], key='rg_3', parameter_name='rg_3') + @ResourceGroupPreparer(name_prefix='clitestdataprotection_000pikumar'[:7], key='rg_2', parameter_name='rg_2') + @ResourceGroupPreparer(name_prefix='clitestdataprotection_SampleResourceGroup'[:7], key='rg', parameter_name='rg') + @ResourceGroupPreparer(name_prefix='clitestdataprotection_BugBash1'[:7], key='rg_4', parameter_name='rg_4') + @ResourceGroupPreparer(name_prefix='clitestdataprotection_Blob-Backup'[:7], key='rg_5', parameter_name='rg_5') + def test_dataprotection_Scenario(self, rg_3, rg_2, rg, rg_4, rg_5): + call_scenario(self) + calc_coverage(__file__) + raise_if() diff --git a/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario_coverage.md b/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario_coverage.md new file mode 100644 index 00000000000..cb712843009 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/tests/latest/test_dataprotection_scenario_coverage.md @@ -0,0 +1,2 @@ +|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| +Coverage: 0/0 diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/__init__.py new file mode 100644 index 00000000000..a5fd06820ce --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_protection_client import DataProtectionClient +__all__ = ['DataProtectionClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_configuration.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_configuration.py new file mode 100644 index 00000000000..1ec133ad5ef --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class DataProtectionClientConfiguration(Configuration): + """Configuration for DataProtectionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataProtectionClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-01-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'dataprotectionclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_data_protection_client.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_data_protection_client.py new file mode 100644 index 00000000000..8c135bfd1c0 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/_data_protection_client.py @@ -0,0 +1,130 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import DataProtectionClientConfiguration +from .operations import BackupVaultsOperations +from .operations import OperationResultOperations +from .operations import OperationStatusOperations +from .operations import BackupVaultOperationResultsOperations +from .operations import DataProtectionOperations +from .operations import DataProtectionOperationsOperations +from .operations import BackupPoliciesOperations +from .operations import BackupInstancesOperations +from .operations import RecoveryPointsOperations +from .operations import JobsOperations +from .operations import RestorableTimeRangesOperations +from .operations import ExportJobsOperations +from .operations import ExportJobsOperationResultOperations +from . import models + + +class DataProtectionClient(object): + """Open API 2.0 Specs for Azure Data Protection service. + + :ivar backup_vaults: BackupVaultsOperations operations + :vartype backup_vaults: data_protection_client.operations.BackupVaultsOperations + :ivar operation_result: OperationResultOperations operations + :vartype operation_result: data_protection_client.operations.OperationResultOperations + :ivar operation_status: OperationStatusOperations operations + :vartype operation_status: data_protection_client.operations.OperationStatusOperations + :ivar backup_vault_operation_results: BackupVaultOperationResultsOperations operations + :vartype backup_vault_operation_results: data_protection_client.operations.BackupVaultOperationResultsOperations + :ivar data_protection: DataProtectionOperations operations + :vartype data_protection: data_protection_client.operations.DataProtectionOperations + :ivar data_protection_operations: DataProtectionOperationsOperations operations + :vartype data_protection_operations: data_protection_client.operations.DataProtectionOperationsOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: data_protection_client.operations.BackupPoliciesOperations + :ivar backup_instances: BackupInstancesOperations operations + :vartype backup_instances: data_protection_client.operations.BackupInstancesOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: data_protection_client.operations.RecoveryPointsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: data_protection_client.operations.JobsOperations + :ivar restorable_time_ranges: RestorableTimeRangesOperations operations + :vartype restorable_time_ranges: data_protection_client.operations.RestorableTimeRangesOperations + :ivar export_jobs: ExportJobsOperations operations + :vartype export_jobs: data_protection_client.operations.ExportJobsOperations + :ivar export_jobs_operation_result: ExportJobsOperationResultOperations operations + :vartype export_jobs_operation_result: data_protection_client.operations.ExportJobsOperationResultOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataProtectionClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.backup_vaults = BackupVaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_result = OperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_status = OperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_vault_operation_results = BackupVaultOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection = DataProtectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection_operations = DataProtectionOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_instances = BackupInstancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.restorable_time_ranges = RestorableTimeRangesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs = ExportJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_result = ExportJobsOperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataProtectionClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/__init__.py new file mode 100644 index 00000000000..ceeb5499cf2 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_protection_client import DataProtectionClient +__all__ = ['DataProtectionClient'] diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_configuration.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_configuration.py new file mode 100644 index 00000000000..c8f5686716d --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class DataProtectionClientConfiguration(Configuration): + """Configuration for DataProtectionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataProtectionClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-01-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'dataprotectionclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_data_protection_client.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_data_protection_client.py new file mode 100644 index 00000000000..6684c769e2a --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/_data_protection_client.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataProtectionClientConfiguration +from .operations import BackupVaultsOperations +from .operations import OperationResultOperations +from .operations import OperationStatusOperations +from .operations import BackupVaultOperationResultsOperations +from .operations import DataProtectionOperations +from .operations import DataProtectionOperationsOperations +from .operations import BackupPoliciesOperations +from .operations import BackupInstancesOperations +from .operations import RecoveryPointsOperations +from .operations import JobsOperations +from .operations import RestorableTimeRangesOperations +from .operations import ExportJobsOperations +from .operations import ExportJobsOperationResultOperations +from .. import models + + +class DataProtectionClient(object): + """Open API 2.0 Specs for Azure Data Protection service. + + :ivar backup_vaults: BackupVaultsOperations operations + :vartype backup_vaults: data_protection_client.aio.operations.BackupVaultsOperations + :ivar operation_result: OperationResultOperations operations + :vartype operation_result: data_protection_client.aio.operations.OperationResultOperations + :ivar operation_status: OperationStatusOperations operations + :vartype operation_status: data_protection_client.aio.operations.OperationStatusOperations + :ivar backup_vault_operation_results: BackupVaultOperationResultsOperations operations + :vartype backup_vault_operation_results: data_protection_client.aio.operations.BackupVaultOperationResultsOperations + :ivar data_protection: DataProtectionOperations operations + :vartype data_protection: data_protection_client.aio.operations.DataProtectionOperations + :ivar data_protection_operations: DataProtectionOperationsOperations operations + :vartype data_protection_operations: data_protection_client.aio.operations.DataProtectionOperationsOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: data_protection_client.aio.operations.BackupPoliciesOperations + :ivar backup_instances: BackupInstancesOperations operations + :vartype backup_instances: data_protection_client.aio.operations.BackupInstancesOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: data_protection_client.aio.operations.RecoveryPointsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: data_protection_client.aio.operations.JobsOperations + :ivar restorable_time_ranges: RestorableTimeRangesOperations operations + :vartype restorable_time_ranges: data_protection_client.aio.operations.RestorableTimeRangesOperations + :ivar export_jobs: ExportJobsOperations operations + :vartype export_jobs: data_protection_client.aio.operations.ExportJobsOperations + :ivar export_jobs_operation_result: ExportJobsOperationResultOperations operations + :vartype export_jobs_operation_result: data_protection_client.aio.operations.ExportJobsOperationResultOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataProtectionClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.backup_vaults = BackupVaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_result = OperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_status = OperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_vault_operation_results = BackupVaultOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection = DataProtectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection_operations = DataProtectionOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_instances = BackupInstancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.restorable_time_ranges = RestorableTimeRangesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs = ExportJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_result = ExportJobsOperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataProtectionClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/__init__.py new file mode 100644 index 00000000000..22292270eb9 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/__init__.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._backup_vaults_operations import BackupVaultsOperations +from ._operation_result_operations import OperationResultOperations +from ._operation_status_operations import OperationStatusOperations +from ._backup_vault_operation_results_operations import BackupVaultOperationResultsOperations +from ._data_protection_operations import DataProtectionOperations +from ._data_protection_operations_operations import DataProtectionOperationsOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._backup_instances_operations import BackupInstancesOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._jobs_operations import JobsOperations +from ._restorable_time_ranges_operations import RestorableTimeRangesOperations +from ._export_jobs_operations import ExportJobsOperations +from ._export_jobs_operation_result_operations import ExportJobsOperationResultOperations + +__all__ = [ + 'BackupVaultsOperations', + 'OperationResultOperations', + 'OperationStatusOperations', + 'BackupVaultOperationResultsOperations', + 'DataProtectionOperations', + 'DataProtectionOperationsOperations', + 'BackupPoliciesOperations', + 'BackupInstancesOperations', + 'RecoveryPointsOperations', + 'JobsOperations', + 'RestorableTimeRangesOperations', + 'ExportJobsOperations', + 'ExportJobsOperationResultOperations', +] diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_instances_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_instances_operations.py new file mode 100644 index 00000000000..4555ca96254 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_instances_operations.py @@ -0,0 +1,1116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupInstancesOperations: + """BackupInstancesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name: str, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.BackupInstanceResourceList"]: + """Gets a backup instances belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupInstanceResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.BackupInstanceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupInstanceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + **kwargs + ) -> "models.BackupInstanceResource": + """Gets a backup instance with name in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupInstanceResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupInstanceResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + async def _create_or_update_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.BackupInstanceResource", + **kwargs + ) -> "models.BackupInstanceResource": + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupInstanceResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + async def begin_create_or_update( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.BackupInstanceResource", + **kwargs + ) -> AsyncLROPoller["models.BackupInstanceResource"]: + """Create or update a backup instance in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BackupInstanceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInstanceResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.BackupInstanceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + async def _delete_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + async def begin_delete( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Delete a backup instance in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + async def _adhoc_backup_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.TriggerBackupRequest", + **kwargs + ) -> Optional["models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._adhoc_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TriggerBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _adhoc_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore + + async def begin_adhoc_backup( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.TriggerBackupRequest", + **kwargs + ) -> AsyncLROPoller["models.OperationJobExtendedInfo"]: + """Trigger adhoc backup. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.TriggerBackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._adhoc_backup_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_adhoc_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore + + async def _validate_for_backup_initial( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.ValidateForBackupRequest", + **kwargs + ) -> Optional["models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_for_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateForBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _validate_for_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore + + async def begin_validate_for_backup( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.ValidateForBackupRequest", + **kwargs + ) -> AsyncLROPoller["models.OperationJobExtendedInfo"]: + """Validate whether adhoc backup will be successful or not. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.ValidateForBackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._validate_for_backup_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore + + async def _trigger_rehydrate_initial( + self, + resource_group_name: str, + vault_name: str, + backup_instance_name: str, + parameters: "models.AzureBackupRehydrationRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._trigger_rehydrate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRehydrationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_rehydrate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore + + async def begin_trigger_rehydrate( + self, + resource_group_name: str, + vault_name: str, + backup_instance_name: str, + parameters: "models.AzureBackupRehydrationRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """rehydrate recovery point for restore for a BackupInstance. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param backup_instance_name: + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupRehydrationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._trigger_rehydrate_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_rehydrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore + + async def _trigger_restore_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.AzureBackupRestoreRequest", + **kwargs + ) -> Optional["models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._trigger_restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _trigger_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + async def begin_trigger_restore( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.AzureBackupRestoreRequest", + **kwargs + ) -> AsyncLROPoller["models.OperationJobExtendedInfo"]: + """Triggers restore for a BackupInstance. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._trigger_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + async def _validate_for_restore_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.ValidateRestoreRequestObject", + **kwargs + ) -> Optional["models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_for_restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateRestoreRequestObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _validate_for_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore + + async def begin_validate_for_restore( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "models.ValidateRestoreRequestObject", + **kwargs + ) -> AsyncLROPoller["models.OperationJobExtendedInfo"]: + """Validates if Restore can be triggered for a DataSource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.ValidateRestoreRequestObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._validate_for_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_policies_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_policies_operations.py new file mode 100644 index 00000000000..e63c9c3eb95 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_policies_operations.py @@ -0,0 +1,313 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupPoliciesOperations: + """BackupPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name: str, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.BaseBackupPolicyResourceList"]: + """Returns list of backup policies belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BaseBackupPolicyResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.BaseBackupPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BaseBackupPolicyResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + **kwargs + ) -> "models.BaseBackupPolicyResource": + """Gets a backup policy belonging to a backup vault. + + Gets a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + async def create_or_update( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + parameters: "models.BaseBackupPolicyResource", + **kwargs + ) -> "models.BaseBackupPolicyResource": + """Creates or Updates a backup policy belonging to a backup vault. + + Creates or Updates a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BaseBackupPolicyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BaseBackupPolicyResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + async def delete( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + **kwargs + ) -> None: + """Deletes a backup policy belonging to a backup vault. + + Deletes a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vault_operation_results_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vault_operation_results_operations.py new file mode 100644 index 00000000000..c3d2cd340a4 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vault_operation_results_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultOperationResultsOperations: + """BackupVaultOperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + vault_name: str, + resource_group_name: str, + operation_id: str, + **kwargs + ) -> "models.BackupVaultResource": + """get. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vaults_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vaults_operations.py new file mode 100644 index 00000000000..5f3c423dece --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_backup_vaults_operations.py @@ -0,0 +1,616 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultsOperations: + """BackupVaultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_in_subscription( + self, + **kwargs + ) -> AsyncIterable["models.BackupVaultResourceList"]: + """Returns resource collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get_in_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.BackupVaultResourceList"]: + """Returns resource collection belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + **kwargs + ) -> "models.BackupVaultResource": + """Returns a resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def _create_or_update_initial( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.BackupVaultResource", + **kwargs + ) -> "models.BackupVaultResource": + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupVaultResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def begin_create_or_update( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.BackupVaultResource", + **kwargs + ) -> AsyncLROPoller["models.BackupVaultResource"]: + """Creates or updates a BackupVault resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BackupVaultResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def delete( + self, + vault_name: str, + resource_group_name: str, + **kwargs + ) -> None: + """Deletes a BackupVault resource from the resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def _update_initial( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.PatchResourceRequestInput", + **kwargs + ) -> Optional["models.BackupVaultResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def begin_update( + self, + vault_name: str, + resource_group_name: str, + parameters: "models.PatchResourceRequestInput", + **kwargs + ) -> AsyncLROPoller["models.BackupVaultResource"]: + """Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + resource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~data_protection_client.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def check_name_availability( + self, + resource_group_name: str, + location: str, + parameters: "models.CheckNameAvailabilityRequest", + **kwargs + ) -> "models.CheckNameAvailabilityResult": + """API to check for resource name availability. + + API to check for resource name availability. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param location: The location in which uniqueness will be verified. + :type location: str + :param parameters: Check name availability request. + :type parameters: ~data_protection_client.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~data_protection_client.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations.py new file mode 100644 index 00000000000..79f7dd19d64 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperations: + """DataProtectionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check_feature_support( + self, + location: str, + parameters: "models.FeatureValidationRequestBase", + **kwargs + ) -> "models.FeatureValidationResponseBase": + """Validates if a feature is supported. + + Validates if a feature is supported. + + :param location: + :type location: str + :param parameters: Feature support request object. + :type parameters: ~data_protection_client.models.FeatureValidationRequestBase + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FeatureValidationResponseBase, or the result of cls(response) + :rtype: ~data_protection_client.models.FeatureValidationResponseBase + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FeatureValidationResponseBase"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_feature_support.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'FeatureValidationRequestBase') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FeatureValidationResponseBase', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_feature_support.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations_operations.py new file mode 100644 index 00000000000..01aa614f26c --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_data_protection_operations_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperationsOperations: + """DataProtectionOperationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["models.ClientDiscoveryResponse"]: + """Returns the list of available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataProtection/operations'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operation_result_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operation_result_operations.py new file mode 100644 index 00000000000..e8c9e88c60f --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operation_result_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperationResultOperations: + """ExportJobsOperationResultOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + vault_name: str, + operation_id: str, + **kwargs + ) -> Optional["models.ExportJobsResult"]: + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also contains URL of a Blob and a SAS key to access the same. The blob + contains exported jobs in JSON serialized format. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param operation_id: OperationID which represents the export job. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportJobsResult, or the result of cls(response) + :rtype: ~data_protection_client.models.ExportJobsResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ExportJobsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExportJobsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operations.py new file mode 100644 index 00000000000..24c916fc6ce --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_export_jobs_operations.py @@ -0,0 +1,156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperations: + """ExportJobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _trigger_initial( + self, + resource_group_name: str, + vault_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._trigger_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore + + async def begin_trigger( + self, + resource_group_name: str, + vault_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Triggers export of jobs and returns an OperationID to track. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._trigger_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_jobs_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_jobs_operations.py new file mode 100644 index 00000000000..45ea97c286a --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_jobs_operations.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + vault_name: str, + **kwargs + ) -> AsyncIterable["models.AzureBackupJobResourceList"]: + """Returns list of jobs belonging to a backup vault. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureBackupJobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.AzureBackupJobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupJobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AzureBackupJobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + vault_name: str, + job_id: str, + **kwargs + ) -> "models.AzureBackupJobResource": + """Gets a job with id in a backup vault. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param job_id: The Job ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupJobResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupJobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupJobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupJobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_result_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_result_operations.py new file mode 100644 index 00000000000..a585a55f6fb --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_result_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultOperations: + """OperationResultOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + operation_id: str, + location: str, + **kwargs + ) -> Optional["models.OperationJobExtendedInfo"]: + """Gets the operation status for a resource. + + Gets the operation result for a resource. + + :param operation_id: + :type operation_id: str + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationJobExtendedInfo, or the result of cls(response) + :rtype: ~data_protection_client.models.OperationJobExtendedInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_status_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_status_operations.py new file mode 100644 index 00000000000..b2ce39b7161 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_operation_status_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationStatusOperations: + """OperationStatusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + operation_id: str, + **kwargs + ) -> "models.OperationResource": + """Gets the operation status for a resource. + + Gets the operation status for a resource. + + :param location: + :type location: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationResource, or the result of cls(response) + :rtype: ~data_protection_client.models.OperationResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_recovery_points_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_recovery_points_operations.py new file mode 100644 index 00000000000..c9a5f85266d --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_recovery_points_operations.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoveryPointsOperations: + """RecoveryPointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.AzureBackupRecoveryPointResourceList"]: + """Returns a list of Recovery Points for a DataSource in a vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureBackupRecoveryPointResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~data_protection_client.models.AzureBackupRecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupRecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AzureBackupRecoveryPointResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + recovery_point_id: str, + **kwargs + ) -> "models.AzureBackupRecoveryPointResource": + """Gets a Recovery Point using recoveryPointId for a Datasource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param recovery_point_id: Recovery point id. + :type recovery_point_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupRecoveryPointResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupRecoveryPointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupRecoveryPointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + 'recoveryPointId': self._serialize.url("recovery_point_id", recovery_point_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupRecoveryPointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_restorable_time_ranges_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_restorable_time_ranges_operations.py new file mode 100644 index 00000000000..cd3ac4031fd --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_restorable_time_ranges_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RestorableTimeRangesOperations: + """RestorableTimeRangesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def find( + self, + vault_name: str, + resource_group_name: str, + backup_instances: str, + parameters: "models.AzureBackupFindRestorableTimeRangesRequest", + **kwargs + ) -> "models.AzureBackupFindRestorableTimeRangesResponseResource": + """find. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instances: Backup instance name. + :type backup_instances: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupFindRestorableTimeRangesResponseResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupFindRestorableTimeRangesResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.find.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstances': self._serialize.url("backup_instances", backup_instances, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupFindRestorableTimeRangesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupFindRestorableTimeRangesResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + find.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstances}/findRestorableTimeRanges'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/__init__.py new file mode 100644 index 00000000000..43ddcf697f4 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/__init__.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AbsoluteDeleteOption + from ._models_py3 import AdHocBackupRuleOptions + from ._models_py3 import AdhocBackupTriggerOption + from ._models_py3 import AdhocBasedTaggingCriteria + from ._models_py3 import AdhocBasedTriggerContext + from ._models_py3 import AzureBackupDiscreteRecoveryPoint + from ._models_py3 import AzureBackupFindRestorableTimeRangesRequest + from ._models_py3 import AzureBackupFindRestorableTimeRangesRequestResource + from ._models_py3 import AzureBackupFindRestorableTimeRangesResponse + from ._models_py3 import AzureBackupFindRestorableTimeRangesResponseResource + from ._models_py3 import AzureBackupJob + from ._models_py3 import AzureBackupJobResource + from ._models_py3 import AzureBackupJobResourceList + from ._models_py3 import AzureBackupParams + from ._models_py3 import AzureBackupRecoveryPoint + from ._models_py3 import AzureBackupRecoveryPointBasedRestoreRequest + from ._models_py3 import AzureBackupRecoveryPointResource + from ._models_py3 import AzureBackupRecoveryPointResourceList + from ._models_py3 import AzureBackupRecoveryTimeBasedRestoreRequest + from ._models_py3 import AzureBackupRehydrationRequest + from ._models_py3 import AzureBackupRestoreRequest + from ._models_py3 import AzureBackupRestoreWithRehydrationRequest + from ._models_py3 import AzureBackupRule + from ._models_py3 import AzureOperationalStoreParameters + from ._models_py3 import AzureRetentionRule + from ._models_py3 import BackupCriteria + from ._models_py3 import BackupInstance + from ._models_py3 import BackupInstanceResource + from ._models_py3 import BackupInstanceResourceList + from ._models_py3 import BackupParameters + from ._models_py3 import BackupPolicy + from ._models_py3 import BackupSchedule + from ._models_py3 import BackupVault + from ._models_py3 import BackupVaultResource + from ._models_py3 import BackupVaultResourceList + from ._models_py3 import BaseBackupPolicy + from ._models_py3 import BaseBackupPolicyResource + from ._models_py3 import BaseBackupPolicyResourceList + from ._models_py3 import BasePolicyRule + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import ClientDiscoveryDisplay + from ._models_py3 import ClientDiscoveryForLogSpecification + from ._models_py3 import ClientDiscoveryForProperties + from ._models_py3 import ClientDiscoveryForServiceSpecification + from ._models_py3 import ClientDiscoveryResponse + from ._models_py3 import ClientDiscoveryValueForSingleApi + from ._models_py3 import CopyOnExpiryOption + from ._models_py3 import CopyOption + from ._models_py3 import CustomCopyOption + from ._models_py3 import DataStoreInfoBase + from ._models_py3 import DataStoreParameters + from ._models_py3 import Datasource + from ._models_py3 import DatasourceSet + from ._models_py3 import Day + from ._models_py3 import DeleteOption + from ._models_py3 import DppIdentityDetails + from ._models_py3 import DppResource + from ._models_py3 import DppResourceList + from ._models_py3 import DppTrackedResource + from ._models_py3 import DppTrackedResourceList + from ._models_py3 import DppWorkerRequest + from ._models_py3 import Error + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ExportJobsResult + from ._models_py3 import FeatureValidationRequest + from ._models_py3 import FeatureValidationRequestBase + from ._models_py3 import FeatureValidationResponse + from ._models_py3 import FeatureValidationResponseBase + from ._models_py3 import ImmediateCopyOption + from ._models_py3 import InnerError + from ._models_py3 import ItemLevelRestoreCriteria + from ._models_py3 import ItemLevelRestoreTargetInfo + from ._models_py3 import JobExtendedInfo + from ._models_py3 import JobSubTask + from ._models_py3 import OperationExtendedInfo + from ._models_py3 import OperationJobExtendedInfo + from ._models_py3 import OperationResource + from ._models_py3 import PatchResourceRequestInput + from ._models_py3 import PolicyInfo + from ._models_py3 import PolicyParameters + from ._models_py3 import ProtectionStatusDetails + from ._models_py3 import RangeBasedItemLevelRestoreCriteria + from ._models_py3 import RecoveryPointDataStoreDetails + from ._models_py3 import RecoveryPointsFilters + from ._models_py3 import RestorableTimeRange + from ._models_py3 import RestoreFilesTargetInfo + from ._models_py3 import RestoreJobRecoveryPointDetails + from ._models_py3 import RestoreTargetInfo + from ._models_py3 import RestoreTargetInfoBase + from ._models_py3 import RetentionTag + from ._models_py3 import ScheduleBasedBackupCriteria + from ._models_py3 import ScheduleBasedTriggerContext + from ._models_py3 import SourceLifeCycle + from ._models_py3 import StorageSetting + from ._models_py3 import SupportedFeature + from ._models_py3 import SystemData + from ._models_py3 import TaggingCriteria + from ._models_py3 import TargetCopySetting + from ._models_py3 import TargetDetails + from ._models_py3 import TriggerBackupRequest + from ._models_py3 import TriggerContext + from ._models_py3 import UserFacingError + from ._models_py3 import ValidateForBackupRequest + from ._models_py3 import ValidateRestoreRequestObject +except (SyntaxError, ImportError): + from ._models import AbsoluteDeleteOption # type: ignore + from ._models import AdHocBackupRuleOptions # type: ignore + from ._models import AdhocBackupTriggerOption # type: ignore + from ._models import AdhocBasedTaggingCriteria # type: ignore + from ._models import AdhocBasedTriggerContext # type: ignore + from ._models import AzureBackupDiscreteRecoveryPoint # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesRequest # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesRequestResource # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesResponse # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesResponseResource # type: ignore + from ._models import AzureBackupJob # type: ignore + from ._models import AzureBackupJobResource # type: ignore + from ._models import AzureBackupJobResourceList # type: ignore + from ._models import AzureBackupParams # type: ignore + from ._models import AzureBackupRecoveryPoint # type: ignore + from ._models import AzureBackupRecoveryPointBasedRestoreRequest # type: ignore + from ._models import AzureBackupRecoveryPointResource # type: ignore + from ._models import AzureBackupRecoveryPointResourceList # type: ignore + from ._models import AzureBackupRecoveryTimeBasedRestoreRequest # type: ignore + from ._models import AzureBackupRehydrationRequest # type: ignore + from ._models import AzureBackupRestoreRequest # type: ignore + from ._models import AzureBackupRestoreWithRehydrationRequest # type: ignore + from ._models import AzureBackupRule # type: ignore + from ._models import AzureOperationalStoreParameters # type: ignore + from ._models import AzureRetentionRule # type: ignore + from ._models import BackupCriteria # type: ignore + from ._models import BackupInstance # type: ignore + from ._models import BackupInstanceResource # type: ignore + from ._models import BackupInstanceResourceList # type: ignore + from ._models import BackupParameters # type: ignore + from ._models import BackupPolicy # type: ignore + from ._models import BackupSchedule # type: ignore + from ._models import BackupVault # type: ignore + from ._models import BackupVaultResource # type: ignore + from ._models import BackupVaultResourceList # type: ignore + from ._models import BaseBackupPolicy # type: ignore + from ._models import BaseBackupPolicyResource # type: ignore + from ._models import BaseBackupPolicyResourceList # type: ignore + from ._models import BasePolicyRule # type: ignore + from ._models import CheckNameAvailabilityRequest # type: ignore + from ._models import CheckNameAvailabilityResult # type: ignore + from ._models import ClientDiscoveryDisplay # type: ignore + from ._models import ClientDiscoveryForLogSpecification # type: ignore + from ._models import ClientDiscoveryForProperties # type: ignore + from ._models import ClientDiscoveryForServiceSpecification # type: ignore + from ._models import ClientDiscoveryResponse # type: ignore + from ._models import ClientDiscoveryValueForSingleApi # type: ignore + from ._models import CopyOnExpiryOption # type: ignore + from ._models import CopyOption # type: ignore + from ._models import CustomCopyOption # type: ignore + from ._models import DataStoreInfoBase # type: ignore + from ._models import DataStoreParameters # type: ignore + from ._models import Datasource # type: ignore + from ._models import DatasourceSet # type: ignore + from ._models import Day # type: ignore + from ._models import DeleteOption # type: ignore + from ._models import DppIdentityDetails # type: ignore + from ._models import DppResource # type: ignore + from ._models import DppResourceList # type: ignore + from ._models import DppTrackedResource # type: ignore + from ._models import DppTrackedResourceList # type: ignore + from ._models import DppWorkerRequest # type: ignore + from ._models import Error # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ExportJobsResult # type: ignore + from ._models import FeatureValidationRequest # type: ignore + from ._models import FeatureValidationRequestBase # type: ignore + from ._models import FeatureValidationResponse # type: ignore + from ._models import FeatureValidationResponseBase # type: ignore + from ._models import ImmediateCopyOption # type: ignore + from ._models import InnerError # type: ignore + from ._models import ItemLevelRestoreCriteria # type: ignore + from ._models import ItemLevelRestoreTargetInfo # type: ignore + from ._models import JobExtendedInfo # type: ignore + from ._models import JobSubTask # type: ignore + from ._models import OperationExtendedInfo # type: ignore + from ._models import OperationJobExtendedInfo # type: ignore + from ._models import OperationResource # type: ignore + from ._models import PatchResourceRequestInput # type: ignore + from ._models import PolicyInfo # type: ignore + from ._models import PolicyParameters # type: ignore + from ._models import ProtectionStatusDetails # type: ignore + from ._models import RangeBasedItemLevelRestoreCriteria # type: ignore + from ._models import RecoveryPointDataStoreDetails # type: ignore + from ._models import RecoveryPointsFilters # type: ignore + from ._models import RestorableTimeRange # type: ignore + from ._models import RestoreFilesTargetInfo # type: ignore + from ._models import RestoreJobRecoveryPointDetails # type: ignore + from ._models import RestoreTargetInfo # type: ignore + from ._models import RestoreTargetInfoBase # type: ignore + from ._models import RetentionTag # type: ignore + from ._models import ScheduleBasedBackupCriteria # type: ignore + from ._models import ScheduleBasedTriggerContext # type: ignore + from ._models import SourceLifeCycle # type: ignore + from ._models import StorageSetting # type: ignore + from ._models import SupportedFeature # type: ignore + from ._models import SystemData # type: ignore + from ._models import TaggingCriteria # type: ignore + from ._models import TargetCopySetting # type: ignore + from ._models import TargetDetails # type: ignore + from ._models import TriggerBackupRequest # type: ignore + from ._models import TriggerContext # type: ignore + from ._models import UserFacingError # type: ignore + from ._models import ValidateForBackupRequest # type: ignore + from ._models import ValidateRestoreRequestObject # type: ignore + +from ._data_protection_client_enums import ( + AbsoluteMarker, + CreatedByType, + CurrentProtectionState, + DataStoreTypes, + DayOfWeek, + FeatureSupportStatus, + FeatureType, + Month, + ProvisioningState, + RecoveryOption, + RehydrationPriority, + RehydrationStatus, + RestoreSourceDataStoreType, + RestoreTargetLocationType, + SourceDataStoreType, + Status, + StorageSettingStoreTypes, + StorageSettingTypes, + WeekNumber, +) + +__all__ = [ + 'AbsoluteDeleteOption', + 'AdHocBackupRuleOptions', + 'AdhocBackupTriggerOption', + 'AdhocBasedTaggingCriteria', + 'AdhocBasedTriggerContext', + 'AzureBackupDiscreteRecoveryPoint', + 'AzureBackupFindRestorableTimeRangesRequest', + 'AzureBackupFindRestorableTimeRangesRequestResource', + 'AzureBackupFindRestorableTimeRangesResponse', + 'AzureBackupFindRestorableTimeRangesResponseResource', + 'AzureBackupJob', + 'AzureBackupJobResource', + 'AzureBackupJobResourceList', + 'AzureBackupParams', + 'AzureBackupRecoveryPoint', + 'AzureBackupRecoveryPointBasedRestoreRequest', + 'AzureBackupRecoveryPointResource', + 'AzureBackupRecoveryPointResourceList', + 'AzureBackupRecoveryTimeBasedRestoreRequest', + 'AzureBackupRehydrationRequest', + 'AzureBackupRestoreRequest', + 'AzureBackupRestoreWithRehydrationRequest', + 'AzureBackupRule', + 'AzureOperationalStoreParameters', + 'AzureRetentionRule', + 'BackupCriteria', + 'BackupInstance', + 'BackupInstanceResource', + 'BackupInstanceResourceList', + 'BackupParameters', + 'BackupPolicy', + 'BackupSchedule', + 'BackupVault', + 'BackupVaultResource', + 'BackupVaultResourceList', + 'BaseBackupPolicy', + 'BaseBackupPolicyResource', + 'BaseBackupPolicyResourceList', + 'BasePolicyRule', + 'CheckNameAvailabilityRequest', + 'CheckNameAvailabilityResult', + 'ClientDiscoveryDisplay', + 'ClientDiscoveryForLogSpecification', + 'ClientDiscoveryForProperties', + 'ClientDiscoveryForServiceSpecification', + 'ClientDiscoveryResponse', + 'ClientDiscoveryValueForSingleApi', + 'CopyOnExpiryOption', + 'CopyOption', + 'CustomCopyOption', + 'DataStoreInfoBase', + 'DataStoreParameters', + 'Datasource', + 'DatasourceSet', + 'Day', + 'DeleteOption', + 'DppIdentityDetails', + 'DppResource', + 'DppResourceList', + 'DppTrackedResource', + 'DppTrackedResourceList', + 'DppWorkerRequest', + 'Error', + 'ErrorAdditionalInfo', + 'ExportJobsResult', + 'FeatureValidationRequest', + 'FeatureValidationRequestBase', + 'FeatureValidationResponse', + 'FeatureValidationResponseBase', + 'ImmediateCopyOption', + 'InnerError', + 'ItemLevelRestoreCriteria', + 'ItemLevelRestoreTargetInfo', + 'JobExtendedInfo', + 'JobSubTask', + 'OperationExtendedInfo', + 'OperationJobExtendedInfo', + 'OperationResource', + 'PatchResourceRequestInput', + 'PolicyInfo', + 'PolicyParameters', + 'ProtectionStatusDetails', + 'RangeBasedItemLevelRestoreCriteria', + 'RecoveryPointDataStoreDetails', + 'RecoveryPointsFilters', + 'RestorableTimeRange', + 'RestoreFilesTargetInfo', + 'RestoreJobRecoveryPointDetails', + 'RestoreTargetInfo', + 'RestoreTargetInfoBase', + 'RetentionTag', + 'ScheduleBasedBackupCriteria', + 'ScheduleBasedTriggerContext', + 'SourceLifeCycle', + 'StorageSetting', + 'SupportedFeature', + 'SystemData', + 'TaggingCriteria', + 'TargetCopySetting', + 'TargetDetails', + 'TriggerBackupRequest', + 'TriggerContext', + 'UserFacingError', + 'ValidateForBackupRequest', + 'ValidateRestoreRequestObject', + 'AbsoluteMarker', + 'CreatedByType', + 'CurrentProtectionState', + 'DataStoreTypes', + 'DayOfWeek', + 'FeatureSupportStatus', + 'FeatureType', + 'Month', + 'ProvisioningState', + 'RecoveryOption', + 'RehydrationPriority', + 'RehydrationStatus', + 'RestoreSourceDataStoreType', + 'RestoreTargetLocationType', + 'SourceDataStoreType', + 'Status', + 'StorageSettingStoreTypes', + 'StorageSettingTypes', + 'WeekNumber', +] diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_data_protection_client_enums.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_data_protection_client_enums.py new file mode 100644 index 00000000000..9f7f2d2cf45 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_data_protection_client_enums.py @@ -0,0 +1,204 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AbsoluteMarker(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL_BACKUP = "AllBackup" + FIRST_OF_DAY = "FirstOfDay" + FIRST_OF_MONTH = "FirstOfMonth" + FIRST_OF_WEEK = "FirstOfWeek" + FIRST_OF_YEAR = "FirstOfYear" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class CurrentProtectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the current protection state of the resource + """ + + INVALID = "Invalid" + NOT_PROTECTED = "NotProtected" + CONFIGURING_PROTECTION = "ConfiguringProtection" + PROTECTION_CONFIGURED = "ProtectionConfigured" + BACKUP_SCHEDULES_SUSPENDED = "BackupSchedulesSuspended" + RETENTION_SCHEDULES_SUSPENDED = "RetentionSchedulesSuspended" + PROTECTION_STOPPED = "ProtectionStopped" + PROTECTION_ERROR = "ProtectionError" + CONFIGURING_PROTECTION_FAILED = "ConfiguringProtectionFailed" + SOFT_DELETING = "SoftDeleting" + SOFT_DELETED = "SoftDeleted" + UPDATING_PROTECTION = "UpdatingProtection" + +class DataStoreTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """type of datastore; Operational/Vault/Archive + """ + + OPERATIONAL_STORE = "OperationalStore" + VAULT_STORE = "VaultStore" + ARCHIVE_STORE = "ArchiveStore" + +class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FRIDAY = "Friday" + MONDAY = "Monday" + SATURDAY = "Saturday" + SUNDAY = "Sunday" + THURSDAY = "Thursday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + +class FeatureSupportStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """feature support status + """ + + INVALID = "Invalid" + NOT_SUPPORTED = "NotSupported" + ALPHA_PREVIEW = "AlphaPreview" + PRIVATE_PREVIEW = "PrivatePreview" + PUBLIC_PREVIEW = "PublicPreview" + GENERALLY_AVAILABLE = "GenerallyAvailable" + +class FeatureType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """backup support feature type. + """ + + INVALID = "Invalid" + DATA_SOURCE_TYPE = "DataSourceType" + +class Month(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + APRIL = "April" + AUGUST = "August" + DECEMBER = "December" + FEBRUARY = "February" + JANUARY = "January" + JULY = "July" + JUNE = "June" + MARCH = "March" + MAY = "May" + NOVEMBER = "November" + OCTOBER = "October" + SEPTEMBER = "September" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the BackupVault resource + """ + + FAILED = "Failed" + PROVISIONING = "Provisioning" + SUCCEEDED = "Succeeded" + UNKNOWN = "Unknown" + UPDATING = "Updating" + +class RecoveryOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Recovery Option + """ + + FAIL_IF_EXISTS = "FailIfExists" + +class RehydrationPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Priority to be used for rehydration. Values High or Standard + """ + + INVALID = "Invalid" + HIGH = "High" + STANDARD = "Standard" + +class RehydrationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS" + COMPLETED = "COMPLETED" + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS" + DELETED = "DELETED" + FAILED = "FAILED" + +class RestoreSourceDataStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the source data store. + """ + + OPERATIONAL_STORE = "OperationalStore" + VAULT_STORE = "VaultStore" + ARCHIVE_STORE = "ArchiveStore" + +class RestoreTargetLocationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Denotes the target location where the data will be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} + """ + + INVALID = "Invalid" + AZURE_BLOBS = "AzureBlobs" + AZURE_FILES = "AzureFiles" + +class SourceDataStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the source data store. + """ + + ARCHIVE_STORE = "ArchiveStore" + SNAPSHOT_STORE = "SnapshotStore" + VAULT_STORE = "VaultStore" + +class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the protection status of the resource + """ + + CONFIGURING_PROTECTION = "ConfiguringProtection" + CONFIGURING_PROTECTION_FAILED = "ConfiguringProtectionFailed" + PROTECTION_CONFIGURED = "ProtectionConfigured" + PROTECTION_STOPPED = "ProtectionStopped" + SOFT_DELETED = "SoftDeleted" + SOFT_DELETING = "SoftDeleting" + +class StorageSettingStoreTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the datastore. + """ + + ARCHIVE_STORE = "ArchiveStore" + SNAPSHOT_STORE = "SnapshotStore" + VAULT_STORE = "VaultStore" + +class StorageSettingTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type. + """ + + GEO_REDUNDANT = "GeoRedundant" + LOCALLY_REDUNDANT = "LocallyRedundant" + +class WeekNumber(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FIRST = "First" + FOURTH = "Fourth" + LAST = "Last" + SECOND = "Second" + THIRD = "Third" diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models.py new file mode 100644 index 00000000000..902b218267e --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models.py @@ -0,0 +1,3808 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class DeleteOption(msrest.serialization.Model): + """Delete Option. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AbsoluteDeleteOption. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AbsoluteDeleteOption': 'AbsoluteDeleteOption'} + } + + def __init__( + self, + **kwargs + ): + super(DeleteOption, self).__init__(**kwargs) + self.duration = kwargs['duration'] + self.object_type = None # type: Optional[str] + + +class AbsoluteDeleteOption(DeleteOption): + """Delete option with duration. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AbsoluteDeleteOption, self).__init__(**kwargs) + self.object_type = 'AbsoluteDeleteOption' # type: str + + +class AdHocBackupRuleOptions(msrest.serialization.Model): + """Adhoc backup rules. + + All required parameters must be populated in order to send to Azure. + + :param rule_name: Required. Specify backup policy rule name. + :type rule_name: str + :param trigger_option: Required. Adhoc backup trigger option. + :type trigger_option: ~data_protection_client.models.AdhocBackupTriggerOption + """ + + _validation = { + 'rule_name': {'required': True}, + 'trigger_option': {'required': True}, + } + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'trigger_option': {'key': 'triggerOption', 'type': 'AdhocBackupTriggerOption'}, + } + + def __init__( + self, + **kwargs + ): + super(AdHocBackupRuleOptions, self).__init__(**kwargs) + self.rule_name = kwargs['rule_name'] + self.trigger_option = kwargs['trigger_option'] + + +class AdhocBackupTriggerOption(msrest.serialization.Model): + """Adhoc backup trigger option. + + :param retention_tag_override: Specify retention override tag. + :type retention_tag_override: str + """ + + _attribute_map = { + 'retention_tag_override': {'key': 'retentionTagOverride', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBackupTriggerOption, self).__init__(**kwargs) + self.retention_tag_override = kwargs.get('retention_tag_override', None) + + +class AdhocBasedTaggingCriteria(msrest.serialization.Model): + """Adhoc backup tagging criteria. + + :param tag_info: Retention tag information. + :type tag_info: ~data_protection_client.models.RetentionTag + """ + + _attribute_map = { + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBasedTaggingCriteria, self).__init__(**kwargs) + self.tag_info = kwargs.get('tag_info', None) + + +class TriggerContext(msrest.serialization.Model): + """Trigger context. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdhocBasedTriggerContext, ScheduleBasedTriggerContext. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AdhocBasedTriggerContext': 'AdhocBasedTriggerContext', 'ScheduleBasedTriggerContext': 'ScheduleBasedTriggerContext'} + } + + def __init__( + self, + **kwargs + ): + super(TriggerContext, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AdhocBasedTriggerContext(TriggerContext): + """Adhoc trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param tagging_criteria: Required. Tagging Criteria containing retention tag for adhoc backup. + :type tagging_criteria: ~data_protection_client.models.AdhocBasedTaggingCriteria + """ + + _validation = { + 'object_type': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': 'AdhocBasedTaggingCriteria'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'AdhocBasedTriggerContext' # type: str + self.tagging_criteria = kwargs['tagging_criteria'] + + +class AzureBackupRecoveryPoint(msrest.serialization.Model): + """Azure backup recoveryPoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupDiscreteRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupDiscreteRecoveryPoint': 'AzureBackupDiscreteRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupDiscreteRecoveryPoint(AzureBackupRecoveryPoint): + """Azure backup discrete RecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: + :type friendly_name: str + :param recovery_point_data_stores_details: + :type recovery_point_data_stores_details: + list[~data_protection_client.models.RecoveryPointDataStoreDetails] + :param recovery_point_time: Required. + :type recovery_point_time: ~datetime.datetime + :param policy_name: + :type policy_name: str + :param policy_version: + :type policy_version: str + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_type: + :type recovery_point_type: str + :param retention_tag_name: + :type retention_tag_name: str + :param retention_tag_version: + :type retention_tag_version: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_data_stores_details': {'key': 'recoveryPointDataStoresDetails', 'type': '[RecoveryPointDataStoreDetails]'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'retention_tag_name': {'key': 'retentionTagName', 'type': 'str'}, + 'retention_tag_version': {'key': 'retentionTagVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupDiscreteRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureBackupDiscreteRecoveryPoint' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.recovery_point_data_stores_details = kwargs.get('recovery_point_data_stores_details', None) + self.recovery_point_time = kwargs['recovery_point_time'] + self.policy_name = kwargs.get('policy_name', None) + self.policy_version = kwargs.get('policy_version', None) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.retention_tag_name = kwargs.get('retention_tag_name', None) + self.retention_tag_version = kwargs.get('retention_tag_version', None) + + +class AzureBackupFindRestorableTimeRangesRequest(msrest.serialization.Model): + """List Restore Ranges Request. + + All required parameters must be populated in order to send to Azure. + + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "OperationalStore", "VaultStore", "ArchiveStore". + :type source_data_store_type: str or ~data_protection_client.models.RestoreSourceDataStoreType + :param start_time: Required. Start time for the List Restore Ranges request. + :type start_time: str + :param end_time: Required. End time for the List Restore Ranges request. + :type end_time: str + """ + + _validation = { + 'source_data_store_type': {'required': True}, + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequest, self).__init__(**kwargs) + self.source_data_store_type = kwargs['source_data_store_type'] + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + + +class DppWorkerRequest(msrest.serialization.Model): + """DppWorkerRequest. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppWorkerRequest, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.uri = kwargs.get('uri', None) + self.headers = kwargs.get('headers', None) + self.supported_group_versions = kwargs.get('supported_group_versions', None) + self.culture_info = kwargs.get('culture_info', None) + self.parameters = kwargs.get('parameters', None) + self.http_method = kwargs.get('http_method', None) + + +class AzureBackupFindRestorableTimeRangesRequestResource(DppWorkerRequest): + """List Restore Ranges Request. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + :param content: AzureBackupFindRestorableTimeRangesRequestResource content. + :type content: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesRequest + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'AzureBackupFindRestorableTimeRangesRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequestResource, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + + +class AzureBackupFindRestorableTimeRangesResponse(msrest.serialization.Model): + """List Restore Ranges Response. + + :param restorable_time_ranges: Returns the Restore Ranges available on the Backup Instance. + :type restorable_time_ranges: list[~data_protection_client.models.RestorableTimeRange] + :param object_type: + :type object_type: str + """ + + _attribute_map = { + 'restorable_time_ranges': {'key': 'restorableTimeRanges', 'type': '[RestorableTimeRange]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponse, self).__init__(**kwargs) + self.restorable_time_ranges = kwargs.get('restorable_time_ranges', None) + self.object_type = kwargs.get('object_type', None) + + +class DppResource(msrest.serialization.Model): + """Resource class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class AzureBackupFindRestorableTimeRangesResponseResource(DppResource): + """List Restore Ranges Response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupFindRestorableTimeRangesResponseResource properties. + :type properties: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupFindRestorableTimeRangesResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureBackupJob(msrest.serialization.Model): + """AzureBackup Job Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param activity_id: Required. Job Activity Id. + :type activity_id: str + :param backup_instance_friendly_name: Required. Name of the Backup Instance. + :type backup_instance_friendly_name: str + :ivar backup_instance_id: ARM ID of the Backup Instance. + :vartype backup_instance_id: str + :param data_source_id: Required. ARM ID of the DataSource. + :type data_source_id: str + :param data_source_location: Required. Location of the DataSource. + :type data_source_location: str + :param data_source_name: Required. User Friendly Name of the DataSource. + :type data_source_name: str + :param data_source_set_name: Required. Data Source Set Name of the DataSource. + :type data_source_set_name: str + :param data_source_type: Required. Type of DataSource. + :type data_source_type: str + :param duration: Total run time of the job. ISO 8601 format. + :type duration: str + :ivar end_time: EndTime of the job(in UTC). + :vartype end_time: ~datetime.datetime + :ivar error_details: A List, detailing the errors related to the job. + :vartype error_details: list[~data_protection_client.models.UserFacingError] + :ivar extended_info: Extended Information about the job. + :vartype extended_info: ~data_protection_client.models.JobExtendedInfo + :param is_user_triggered: Required. Indicated that whether the job is adhoc(true) or + scheduled(false). + :type is_user_triggered: bool + :param operation: Required. It indicates the type of Job i.e. Backup:full/log/diff + ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. + :type operation: str + :param operation_category: Required. It indicates the type of Job i.e. + Backup/Restore/Tiering/Management. + :type operation_category: str + :ivar policy_id: ARM ID of the policy. + :vartype policy_id: str + :ivar policy_name: Name of the policy. + :vartype policy_name: str + :param progress_enabled: Required. Indicated whether progress is enabled for the job. + :type progress_enabled: bool + :ivar progress_url: Url which contains job's progress. + :vartype progress_url: str + :ivar restore_type: It indicates the sub type of operation i.e. in case of Restore it can be + ALR/OLR. + :vartype restore_type: str + :param source_resource_group: Required. Resource Group Name of the Datasource. + :type source_resource_group: str + :param source_subscription_id: Required. SubscriptionId corresponding to the DataSource. + :type source_subscription_id: str + :param start_time: Required. StartTime of the job(in UTC). + :type start_time: ~datetime.datetime + :param status: Required. Status of the job like + InProgress/Success/Failed/Cancelled/SuccessWithWarning. + :type status: str + :param subscription_id: Required. Subscription Id of the corresponding backup vault. + :type subscription_id: str + :param supported_actions: Required. List of supported actions. + :type supported_actions: list[str] + :param vault_name: Required. Name of the vault. + :type vault_name: str + :param etag: + :type etag: str + :param source_data_store_name: + :type source_data_store_name: str + :param destination_data_store_name: + :type destination_data_store_name: str + """ + + _validation = { + 'activity_id': {'required': True}, + 'backup_instance_friendly_name': {'required': True}, + 'backup_instance_id': {'readonly': True}, + 'data_source_id': {'required': True}, + 'data_source_location': {'required': True}, + 'data_source_name': {'required': True}, + 'data_source_set_name': {'required': True}, + 'data_source_type': {'required': True}, + 'end_time': {'readonly': True}, + 'error_details': {'readonly': True}, + 'extended_info': {'readonly': True}, + 'is_user_triggered': {'required': True}, + 'operation': {'required': True}, + 'operation_category': {'required': True}, + 'policy_id': {'readonly': True}, + 'policy_name': {'readonly': True}, + 'progress_enabled': {'required': True}, + 'progress_url': {'readonly': True}, + 'restore_type': {'readonly': True}, + 'source_resource_group': {'required': True}, + 'source_subscription_id': {'required': True}, + 'start_time': {'required': True}, + 'status': {'required': True}, + 'subscription_id': {'required': True}, + 'supported_actions': {'required': True}, + 'vault_name': {'required': True}, + } + + _attribute_map = { + 'activity_id': {'key': 'activityID', 'type': 'str'}, + 'backup_instance_friendly_name': {'key': 'backupInstanceFriendlyName', 'type': 'str'}, + 'backup_instance_id': {'key': 'backupInstanceId', 'type': 'str'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'data_source_location': {'key': 'dataSourceLocation', 'type': 'str'}, + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_set_name': {'key': 'dataSourceSetName', 'type': 'str'}, + 'data_source_type': {'key': 'dataSourceType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error_details': {'key': 'errorDetails', 'type': '[UserFacingError]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'JobExtendedInfo'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'operation_category': {'key': 'operationCategory', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'progress_enabled': {'key': 'progressEnabled', 'type': 'bool'}, + 'progress_url': {'key': 'progressUrl', 'type': 'str'}, + 'restore_type': {'key': 'restoreType', 'type': 'str'}, + 'source_resource_group': {'key': 'sourceResourceGroup', 'type': 'str'}, + 'source_subscription_id': {'key': 'sourceSubscriptionID', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'supported_actions': {'key': 'supportedActions', 'type': '[str]'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'source_data_store_name': {'key': 'sourceDataStoreName', 'type': 'str'}, + 'destination_data_store_name': {'key': 'destinationDataStoreName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJob, self).__init__(**kwargs) + self.activity_id = kwargs['activity_id'] + self.backup_instance_friendly_name = kwargs['backup_instance_friendly_name'] + self.backup_instance_id = None + self.data_source_id = kwargs['data_source_id'] + self.data_source_location = kwargs['data_source_location'] + self.data_source_name = kwargs['data_source_name'] + self.data_source_set_name = kwargs['data_source_set_name'] + self.data_source_type = kwargs['data_source_type'] + self.duration = kwargs.get('duration', None) + self.end_time = None + self.error_details = None + self.extended_info = None + self.is_user_triggered = kwargs['is_user_triggered'] + self.operation = kwargs['operation'] + self.operation_category = kwargs['operation_category'] + self.policy_id = None + self.policy_name = None + self.progress_enabled = kwargs['progress_enabled'] + self.progress_url = None + self.restore_type = None + self.source_resource_group = kwargs['source_resource_group'] + self.source_subscription_id = kwargs['source_subscription_id'] + self.start_time = kwargs['start_time'] + self.status = kwargs['status'] + self.subscription_id = kwargs['subscription_id'] + self.supported_actions = kwargs['supported_actions'] + self.vault_name = kwargs['vault_name'] + self.etag = kwargs.get('etag', None) + self.source_data_store_name = kwargs.get('source_data_store_name', None) + self.destination_data_store_name = kwargs.get('destination_data_store_name', None) + + +class AzureBackupJobResource(DppResource): + """AzureBackup Job Resource Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupJobResource properties. + :type properties: ~data_protection_client.models.AzureBackupJob + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupJob'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DppResourceList(msrest.serialization.Model): + """ListResource. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class AzureBackupJobResourceList(DppResourceList): + """List of AzureBackup Job resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.AzureBackupJobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupJobResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BackupParameters(msrest.serialization.Model): + """BackupParameters base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupParams. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupParams': 'AzureBackupParams'} + } + + def __init__( + self, + **kwargs + ): + super(BackupParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupParams(BackupParameters): + """Azure backup parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param backup_type: Required. BackupType ; Full/Incremental etc. + :type backup_type: str + """ + + _validation = { + 'object_type': {'required': True}, + 'backup_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupParams, self).__init__(**kwargs) + self.object_type = 'AzureBackupParams' # type: str + self.backup_type = kwargs['backup_type'] + + +class AzureBackupRestoreRequest(msrest.serialization.Model): + """Azure backup restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRecoveryPointBasedRestoreRequest, AzureBackupRecoveryTimeBasedRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRecoveryPointBasedRestoreRequest': 'AzureBackupRecoveryPointBasedRestoreRequest', 'AzureBackupRecoveryTimeBasedRestoreRequest': 'AzureBackupRecoveryTimeBasedRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.restore_target_info = kwargs['restore_target_info'] + self.source_data_store_type = kwargs['source_data_store_type'] + + +class AzureBackupRecoveryPointBasedRestoreRequest(AzureBackupRestoreRequest): + """Azure backup recoveryPoint based restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRestoreWithRehydrationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRestoreWithRehydrationRequest': 'AzureBackupRestoreWithRehydrationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointBasedRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRecoveryPointBasedRestoreRequest' # type: str + self.recovery_point_id = kwargs['recovery_point_id'] + + +class AzureBackupRecoveryPointResource(DppResource): + """Azure backup recoveryPoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupRecoveryPointResource properties. + :type properties: ~data_protection_client.models.AzureBackupRecoveryPoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupRecoveryPoint'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureBackupRecoveryPointResourceList(DppResourceList): + """Azure backup recoveryPoint resource list. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.AzureBackupRecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupRecoveryPointResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AzureBackupRecoveryTimeBasedRestoreRequest(AzureBackupRestoreRequest): + """AzureBackup RecoveryPointTime Based Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_time: Required. The recovery time in ISO 8601 format example - + 2020-08-14T17:30:00.0000000Z. + :type recovery_point_time: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryTimeBasedRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRecoveryTimeBasedRestoreRequest' # type: str + self.recovery_point_time = kwargs['recovery_point_time'] + + +class AzureBackupRehydrationRequest(msrest.serialization.Model): + """Azure Backup Rehydrate Request. + + All required parameters must be populated in order to send to Azure. + + :param recovery_point_id: Required. Id of the recovery point to be recovered. + :type recovery_point_id: str + :param rehydration_priority: Priority to be used for rehydration. Values High or Standard. + Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~data_protection_client.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'recovery_point_id': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRehydrationRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs['recovery_point_id'] + self.rehydration_priority = kwargs.get('rehydration_priority', None) + self.rehydration_retention_duration = kwargs['rehydration_retention_duration'] + + +class AzureBackupRestoreWithRehydrationRequest(AzureBackupRecoveryPointBasedRestoreRequest): + """AzureBackup Restore with Rehydration Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + :param rehydration_priority: Required. Priority to be used for rehydration. Values High or + Standard. Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~data_protection_client.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + 'rehydration_priority': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRestoreWithRehydrationRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRestoreWithRehydrationRequest' # type: str + self.rehydration_priority = kwargs['rehydration_priority'] + self.rehydration_retention_duration = kwargs['rehydration_retention_duration'] + + +class BasePolicyRule(msrest.serialization.Model): + """BasePolicy Rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRule, AzureRetentionRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRule': 'AzureBackupRule', 'AzureRetentionRule': 'AzureRetentionRule'} + } + + def __init__( + self, + **kwargs + ): + super(BasePolicyRule, self).__init__(**kwargs) + self.name = kwargs['name'] + self.object_type = None # type: Optional[str] + + +class AzureBackupRule(BasePolicyRule): + """Azure backup rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_parameters: BackupParameters base. + :type backup_parameters: ~data_protection_client.models.BackupParameters + :param data_store: Required. DataStoreInfo base. + :type data_store: ~data_protection_client.models.DataStoreInfoBase + :param trigger: Required. Trigger context. + :type trigger: ~data_protection_client.models.TriggerContext + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'data_store': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_parameters': {'key': 'backupParameters', 'type': 'BackupParameters'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerContext'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRule, self).__init__(**kwargs) + self.object_type = 'AzureBackupRule' # type: str + self.backup_parameters = kwargs.get('backup_parameters', None) + self.data_store = kwargs['data_store'] + self.trigger = kwargs['trigger'] + + +class DataStoreParameters(msrest.serialization.Model): + """Parameters for DataStore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureOperationalStoreParameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureOperationalStoreParameters': 'AzureOperationalStoreParameters'} + } + + def __init__( + self, + **kwargs + ): + super(DataStoreParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.data_store_type = kwargs['data_store_type'] + + +class AzureOperationalStoreParameters(DataStoreParameters): + """Parameters for Operational-Tier DataStore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + :param resource_group_id: Gets or sets the Snapshot Resource Group Uri. + :type resource_group_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureOperationalStoreParameters, self).__init__(**kwargs) + self.object_type = 'AzureOperationalStoreParameters' # type: str + self.resource_group_id = kwargs.get('resource_group_id', None) + + +class AzureRetentionRule(BasePolicyRule): + """Azure retention rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param is_default: + :type is_default: bool + :param lifecycles: Required. + :type lifecycles: list[~data_protection_client.models.SourceLifeCycle] + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'lifecycles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'lifecycles': {'key': 'lifecycles', 'type': '[SourceLifeCycle]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureRetentionRule, self).__init__(**kwargs) + self.object_type = 'AzureRetentionRule' # type: str + self.is_default = kwargs.get('is_default', None) + self.lifecycles = kwargs['lifecycles'] + + +class BackupCriteria(msrest.serialization.Model): + """BackupCriteria base class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduleBasedBackupCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ScheduleBasedBackupCriteria': 'ScheduleBasedBackupCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(BackupCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class BackupInstance(msrest.serialization.Model): + """Backup Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Gets or sets the Backup Instance friendly name. + :type friendly_name: str + :param data_source_info: Required. Gets or sets the data source information. + :type data_source_info: ~data_protection_client.models.Datasource + :param data_source_set_info: Gets or sets the data source set information. + :type data_source_set_info: ~data_protection_client.models.DatasourceSet + :param policy_info: Required. Gets or sets the policy information. + :type policy_info: ~data_protection_client.models.PolicyInfo + :ivar protection_status: Specifies the protection status of the resource. + :vartype protection_status: ~data_protection_client.models.ProtectionStatusDetails + :ivar current_protection_state: Specifies the current protection state of the resource. + Possible values include: "Invalid", "NotProtected", "ConfiguringProtection", + "ProtectionConfigured", "BackupSchedulesSuspended", "RetentionSchedulesSuspended", + "ProtectionStopped", "ProtectionError", "ConfiguringProtectionFailed", "SoftDeleting", + "SoftDeleted", "UpdatingProtection". + :vartype current_protection_state: str or ~data_protection_client.models.CurrentProtectionState + :ivar protection_error_details: Specifies the protection error of the resource. + :vartype protection_error_details: ~data_protection_client.models.UserFacingError + :ivar provisioning_state: Specifies the provisioning state of the resource i.e. + provisioning/updating/Succeeded/Failed. + :vartype provisioning_state: str + :param object_type: Required. + :type object_type: str + """ + + _validation = { + 'data_source_info': {'required': True}, + 'policy_info': {'required': True}, + 'protection_status': {'readonly': True}, + 'current_protection_state': {'readonly': True}, + 'protection_error_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'data_source_info': {'key': 'dataSourceInfo', 'type': 'Datasource'}, + 'data_source_set_info': {'key': 'dataSourceSetInfo', 'type': 'DatasourceSet'}, + 'policy_info': {'key': 'policyInfo', 'type': 'PolicyInfo'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'ProtectionStatusDetails'}, + 'current_protection_state': {'key': 'currentProtectionState', 'type': 'str'}, + 'protection_error_details': {'key': 'protectionErrorDetails', 'type': 'UserFacingError'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstance, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.data_source_info = kwargs['data_source_info'] + self.data_source_set_info = kwargs.get('data_source_set_info', None) + self.policy_info = kwargs['policy_info'] + self.protection_status = None + self.current_protection_state = None + self.protection_error_details = None + self.provisioning_state = None + self.object_type = kwargs['object_type'] + + +class BackupInstanceResource(DppResource): + """BackupInstance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: BackupInstanceResource properties. + :type properties: ~data_protection_client.models.BackupInstance + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupInstance'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstanceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupInstanceResourceList(DppResourceList): + """BackupInstance Resource list response. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BackupInstanceResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupInstanceResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstanceResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BaseBackupPolicy(msrest.serialization.Model): + """BackupPolicy base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BackupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'BackupPolicy': 'BackupPolicy'} + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicy, self).__init__(**kwargs) + self.datasource_types = kwargs['datasource_types'] + self.object_type = None # type: Optional[str] + + +class BackupPolicy(BaseBackupPolicy): + """Rule based backup policy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + :param policy_rules: Required. Policy rule dictionary that contains rules for each backuptype + i.e Full/Incremental/Logs etc. + :type policy_rules: list[~data_protection_client.models.BasePolicyRule] + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + 'policy_rules': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'policy_rules': {'key': 'policyRules', 'type': '[BasePolicyRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupPolicy, self).__init__(**kwargs) + self.object_type = 'BackupPolicy' # type: str + self.policy_rules = kwargs['policy_rules'] + + +class BackupSchedule(msrest.serialization.Model): + """Schedule for backup. + + All required parameters must be populated in order to send to Azure. + + :param repeating_time_intervals: Required. ISO 8601 repeating time interval format. + :type repeating_time_intervals: list[str] + """ + + _validation = { + 'repeating_time_intervals': {'required': True}, + } + + _attribute_map = { + 'repeating_time_intervals': {'key': 'repeatingTimeIntervals', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.repeating_time_intervals = kwargs['repeating_time_intervals'] + + +class BackupVault(msrest.serialization.Model): + """Backup Vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~data_protection_client.models.ProvisioningState + :param storage_settings: Required. Storage Settings. + :type storage_settings: list[~data_protection_client.models.StorageSetting] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'storage_settings': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'storage_settings': {'key': 'storageSettings', 'type': '[StorageSetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVault, self).__init__(**kwargs) + self.provisioning_state = None + self.storage_settings = kwargs['storage_settings'] + + +class DppTrackedResource(msrest.serialization.Model): + """DppTrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppTrackedResource, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.id = None + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.name = None + self.tags = kwargs.get('tags', None) + self.type = None + self.system_data = None + + +class BackupVaultResource(DppTrackedResource): + """Backup Vault Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: Required. BackupVaultResource properties. + :type properties: ~data_protection_client.models.BackupVault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupVault'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVaultResource, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class BackupVaultResourceList(DppResourceList): + """List of BackupVault resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BackupVaultResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupVaultResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVaultResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BaseBackupPolicyResource(DppResource): + """BaseBackupPolicy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: BaseBackupPolicyResource properties. + :type properties: ~data_protection_client.models.BaseBackupPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BaseBackupPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicyResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BaseBackupPolicyResourceList(DppResourceList): + """List of BaseBackupPolicy resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BaseBackupPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BaseBackupPolicyResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicyResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """CheckNameAvailability Request. + + :param name: Resource name for which availability needs to be checked. + :type name: str + :param type: Describes the Resource type: Microsoft.DataProtection/BackupVaults. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """CheckNameAvailability Result. + + :param message: Gets or sets the message. + :type message: str + :param name_available: Gets or sets a value indicating whether [name available]. + :type name_available: bool + :param reason: Gets or sets the reason. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :param description: Description of the operation having details of what operation is about. + :type description: str + :param operation: Operations Name itself. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :param blob_duration: blob duration of shoebox log specification. + :type blob_duration: str + :param display_name: Localized display name. + :type display_name: str + :param name: Name for shoebox log specification. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.blob_duration = kwargs.get('blob_duration', None) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~data_protection_client.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~data_protection_client.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :param next_link: Link to the next chunk of Response. + :type next_link: str + :param value: List of available operations. + :type value: list[~data_protection_client.models.ClientDiscoveryValueForSingleApi] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryResponse, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :param display: Contains the localized display information for this particular operation. + :type display: ~data_protection_client.models.ClientDiscoveryDisplay + :param name: Name of the Operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Properties for the given operation. + :type properties: ~data_protection_client.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.display = kwargs.get('display', None) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class CopyOption(msrest.serialization.Model): + """Options to copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CopyOnExpiryOption, CustomCopyOption, ImmediateCopyOption. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'CopyOnExpiryOption': 'CopyOnExpiryOption', 'CustomCopyOption': 'CustomCopyOption', 'ImmediateCopyOption': 'ImmediateCopyOption'} + } + + def __init__( + self, + **kwargs + ): + super(CopyOption, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class CopyOnExpiryOption(CopyOption): + """Copy on Expiry Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyOnExpiryOption, self).__init__(**kwargs) + self.object_type = 'CopyOnExpiryOption' # type: str + + +class CustomCopyOption(CopyOption): + """Duration based custom options to copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param duration: Data copied after given timespan. + :type duration: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomCopyOption, self).__init__(**kwargs) + self.object_type = 'CustomCopyOption' # type: str + self.duration = kwargs.get('duration', None) + + +class Datasource(msrest.serialization.Model): + """Datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Datasource, self).__init__(**kwargs) + self.datasource_type = kwargs.get('datasource_type', None) + self.object_type = kwargs.get('object_type', None) + self.resource_id = kwargs['resource_id'] + self.resource_location = kwargs.get('resource_location', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_uri = kwargs.get('resource_uri', None) + + +class DatasourceSet(msrest.serialization.Model): + """DatasourceSet details of datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatasourceSet, self).__init__(**kwargs) + self.datasource_type = kwargs.get('datasource_type', None) + self.object_type = kwargs.get('object_type', None) + self.resource_id = kwargs['resource_id'] + self.resource_location = kwargs.get('resource_location', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_uri = kwargs.get('resource_uri', None) + + +class DataStoreInfoBase(msrest.serialization.Model): + """DataStoreInfo base. + + All required parameters must be populated in order to send to Azure. + + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type. + :type object_type: str + """ + + _validation = { + 'data_store_type': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataStoreInfoBase, self).__init__(**kwargs) + self.data_store_type = kwargs['data_store_type'] + self.object_type = kwargs['object_type'] + + +class Day(msrest.serialization.Model): + """Day of the week. + + :param date: Date of the month. + :type date: int + :param is_last: Whether Date is last date of month. + :type is_last: bool + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Day, self).__init__(**kwargs) + self.date = kwargs.get('date', None) + self.is_last = kwargs.get('is_last', None) + + +class DppIdentityDetails(msrest.serialization.Model): + """Identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object ID of the service principal object for the managed identity that + is used to grant role-based access to an Azure resource. + :vartype principal_id: str + :ivar tenant_id: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where + the resource is now a member. + :vartype tenant_id: str + :param type: The identityType which can be either SystemAssigned or None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppIdentityDetails, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class DppTrackedResourceList(msrest.serialization.Model): + """DppTrackedResourceList. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppTrackedResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class Error(msrest.serialization.Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_info: The error additional info. + :vartype additional_info: list[~data_protection_client.models.ErrorAdditionalInfo] + :ivar code: The error code. + :vartype code: str + :ivar details: The error details. + :vartype details: list[~data_protection_client.models.Error] + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + """ + + _validation = { + 'additional_info': {'readonly': True}, + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.additional_info = None + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar info: The additional info. + :vartype info: object + :ivar type: The additional info type. + :vartype type: str + """ + + _validation = { + 'info': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'info': {'key': 'info', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.info = None + self.type = None + + +class ExportJobsResult(msrest.serialization.Model): + """The result for export jobs containing blob details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the ExcelFile blob. + :vartype excel_file_blob_sas_key: str + """ + + _validation = { + 'blob_url': {'readonly': True}, + 'blob_sas_key': {'readonly': True}, + 'excel_file_blob_url': {'readonly': True}, + 'excel_file_blob_sas_key': {'readonly': True}, + } + + _attribute_map = { + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportJobsResult, self).__init__(**kwargs) + self.blob_url = None + self.blob_sas_key = None + self.excel_file_blob_url = None + self.excel_file_blob_sas_key = None + + +class FeatureValidationRequestBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationRequest': 'FeatureValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequestBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationRequest(FeatureValidationRequestBase): + """Base class for feature object. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~data_protection_client.models.FeatureType + :param feature_name: backup support feature name. + :type feature_name: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'feature_name': {'key': 'featureName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequest, self).__init__(**kwargs) + self.object_type = 'FeatureValidationRequest' # type: str + self.feature_type = kwargs.get('feature_type', None) + self.feature_name = kwargs.get('feature_name', None) + + +class FeatureValidationResponseBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationResponse. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationResponse': 'FeatureValidationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponseBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationResponse(FeatureValidationResponseBase): + """Feature Validation Response. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~data_protection_client.models.FeatureType + :param features: Response features. + :type features: list[~data_protection_client.models.SupportedFeature] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SupportedFeature]'}, + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponse, self).__init__(**kwargs) + self.object_type = 'FeatureValidationResponse' # type: str + self.feature_type = kwargs.get('feature_type', None) + self.features = kwargs.get('features', None) + + +class ImmediateCopyOption(CopyOption): + """Immediate copy Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImmediateCopyOption, self).__init__(**kwargs) + self.object_type = 'ImmediateCopyOption' # type: str + + +class InnerError(msrest.serialization.Model): + """Inner Error. + + :param additional_info: Any Key value pairs that can be provided to the client for additional + verbose information. + :type additional_info: dict[str, str] + :param code: Unique code for this error. + :type code: str + :param embedded_inner_error: Child Inner Error, to allow Nesting. + :type embedded_inner_error: ~data_protection_client.models.InnerError + """ + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '{str}'}, + 'code': {'key': 'code', 'type': 'str'}, + 'embedded_inner_error': {'key': 'embeddedInnerError', 'type': 'InnerError'}, + } + + def __init__( + self, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.additional_info = kwargs.get('additional_info', None) + self.code = kwargs.get('code', None) + self.embedded_inner_error = kwargs.get('embedded_inner_error', None) + + +class ItemLevelRestoreCriteria(msrest.serialization.Model): + """Class to contain criteria for item level restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RangeBasedItemLevelRestoreCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'RangeBasedItemLevelRestoreCriteria': 'RangeBasedItemLevelRestoreCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class RestoreTargetInfoBase(msrest.serialization.Model): + """Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ItemLevelRestoreTargetInfo, RestoreFilesTargetInfo, RestoreTargetInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ItemLevelRestoreTargetInfo': 'ItemLevelRestoreTargetInfo', 'RestoreFilesTargetInfo': 'RestoreFilesTargetInfo', 'RestoreTargetInfo': 'RestoreTargetInfo'} + } + + def __init__( + self, + **kwargs + ): + super(RestoreTargetInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.recovery_option = kwargs['recovery_option'] + self.restore_location = kwargs.get('restore_location', None) + + +class ItemLevelRestoreTargetInfo(RestoreTargetInfoBase): + """Restore target info for Item level restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param restore_criteria: Required. Restore Criteria. + :type restore_criteria: list[~data_protection_client.models.ItemLevelRestoreCriteria] + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~data_protection_client.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~data_protection_client.models.DatasourceSet + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'restore_criteria': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'restore_criteria': {'key': 'restoreCriteria', 'type': '[ItemLevelRestoreCriteria]'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreTargetInfo, self).__init__(**kwargs) + self.object_type = 'ItemLevelRestoreTargetInfo' # type: str + self.restore_criteria = kwargs['restore_criteria'] + self.datasource_info = kwargs['datasource_info'] + self.datasource_set_info = kwargs.get('datasource_set_info', None) + + +class JobExtendedInfo(msrest.serialization.Model): + """Extended Information about the job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param additional_details: Job's Additional Details. + :type additional_details: dict[str, str] + :ivar backup_instance_state: State of the Backup Instance. + :vartype backup_instance_state: str + :ivar data_transferred_in_bytes: Number of bytes transferred. + :vartype data_transferred_in_bytes: float + :ivar recovery_destination: Destination where restore is done. + :vartype recovery_destination: str + :ivar source_recover_point: Details of the Source Recovery Point. + :vartype source_recover_point: ~data_protection_client.models.RestoreJobRecoveryPointDetails + :ivar sub_tasks: List of Sub Tasks of the job. + :vartype sub_tasks: list[~data_protection_client.models.JobSubTask] + :ivar target_recover_point: Details of the Target Recovery Point. + :vartype target_recover_point: ~data_protection_client.models.RestoreJobRecoveryPointDetails + """ + + _validation = { + 'backup_instance_state': {'readonly': True}, + 'data_transferred_in_bytes': {'readonly': True}, + 'recovery_destination': {'readonly': True}, + 'source_recover_point': {'readonly': True}, + 'sub_tasks': {'readonly': True}, + 'target_recover_point': {'readonly': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'backup_instance_state': {'key': 'backupInstanceState', 'type': 'str'}, + 'data_transferred_in_bytes': {'key': 'dataTransferredInBytes', 'type': 'float'}, + 'recovery_destination': {'key': 'recoveryDestination', 'type': 'str'}, + 'source_recover_point': {'key': 'sourceRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + 'sub_tasks': {'key': 'subTasks', 'type': '[JobSubTask]'}, + 'target_recover_point': {'key': 'targetRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(JobExtendedInfo, self).__init__(**kwargs) + self.additional_details = kwargs.get('additional_details', None) + self.backup_instance_state = None + self.data_transferred_in_bytes = None + self.recovery_destination = None + self.source_recover_point = None + self.sub_tasks = None + self.target_recover_point = None + + +class JobSubTask(msrest.serialization.Model): + """Details of Job's Sub Task. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_details: Additional details of Sub Tasks. + :type additional_details: dict[str, str] + :param task_id: Required. Task Id of the Sub Task. + :type task_id: int + :param task_name: Required. Name of the Sub Task. + :type task_name: str + :ivar task_progress: Progress of the Sub Task. + :vartype task_progress: str + :param task_status: Required. Status of the Sub Task. + :type task_status: str + """ + + _validation = { + 'task_id': {'required': True}, + 'task_name': {'required': True}, + 'task_progress': {'readonly': True}, + 'task_status': {'required': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'task_id': {'key': 'taskId', 'type': 'int'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'task_progress': {'key': 'taskProgress', 'type': 'str'}, + 'task_status': {'key': 'taskStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobSubTask, self).__init__(**kwargs) + self.additional_details = kwargs.get('additional_details', None) + self.task_id = kwargs['task_id'] + self.task_name = kwargs['task_name'] + self.task_progress = None + self.task_status = kwargs['task_status'] + + +class OperationExtendedInfo(msrest.serialization.Model): + """Operation Extended Info. + + :param object_type: This property will be used as the discriminator for deciding the specific + types in the polymorphic chain of types. + :type object_type: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationExtendedInfo, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + + +class OperationJobExtendedInfo(OperationExtendedInfo): + """Operation Job Extended Info. + + :param object_type: This property will be used as the discriminator for deciding the specific + types in the polymorphic chain of types. + :type object_type: str + :param job_id: Arm Id of the job created for this operation. + :type job_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationJobExtendedInfo, self).__init__(**kwargs) + self.job_id = kwargs.get('job_id', None) + + +class OperationResource(msrest.serialization.Model): + """Operation Resource. + + :param end_time: End time of the operation. + :type end_time: ~datetime.datetime + :param error: Required if status == failed or status == canceled. This is the OData v4 error + format, used by the RPC and will go into the v2.2 Azure REST API guidelines. + The full set of optional properties (e.g. inner errors / details) can be found in the "Error + Response" section. + :type error: ~data_protection_client.models.Error + :param id: It should match what is used to GET the operation result. + :type id: str + :param name: It must match the last segment of the "id" field, and will typically be a GUID / + system generated value. + :type name: str + :param properties: End time of the operation. + :type properties: ~data_protection_client.models.OperationExtendedInfo + :param start_time: Start time of the operation. + :type start_time: ~datetime.datetime + :param status: + :type status: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationExtendedInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResource, self).__init__(**kwargs) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) + self.start_time = kwargs.get('start_time', None) + self.status = kwargs.get('status', None) + + +class PatchResourceRequestInput(msrest.serialization.Model): + """Patch Request content for Microsoft.DataProtection resources. + + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchResourceRequestInput, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.tags = kwargs.get('tags', None) + + +class PolicyInfo(msrest.serialization.Model): + """Policy Info in backupInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param policy_id: Required. + :type policy_id: str + :ivar policy_version: + :vartype policy_version: str + :param policy_parameters: Policy parameters for the backup instance. + :type policy_parameters: ~data_protection_client.models.PolicyParameters + """ + + _validation = { + 'policy_id': {'required': True}, + 'policy_version': {'readonly': True}, + } + + _attribute_map = { + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'policy_parameters': {'key': 'policyParameters', 'type': 'PolicyParameters'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyInfo, self).__init__(**kwargs) + self.policy_id = kwargs['policy_id'] + self.policy_version = None + self.policy_parameters = kwargs.get('policy_parameters', None) + + +class PolicyParameters(msrest.serialization.Model): + """Parameters in Policy. + + :param data_store_parameters_list: Gets or sets the DataStore Parameters. + :type data_store_parameters_list: list[~data_protection_client.models.DataStoreParameters] + """ + + _attribute_map = { + 'data_store_parameters_list': {'key': 'dataStoreParametersList', 'type': '[DataStoreParameters]'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyParameters, self).__init__(**kwargs) + self.data_store_parameters_list = kwargs.get('data_store_parameters_list', None) + + +class ProtectionStatusDetails(msrest.serialization.Model): + """Protection status details. + + :param error_details: Specifies the protection status error of the resource. + :type error_details: ~data_protection_client.models.UserFacingError + :param status: Specifies the protection status of the resource. Possible values include: + "ConfiguringProtection", "ConfiguringProtectionFailed", "ProtectionConfigured", + "ProtectionStopped", "SoftDeleted", "SoftDeleting". + :type status: str or ~data_protection_client.models.Status + """ + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': 'UserFacingError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProtectionStatusDetails, self).__init__(**kwargs) + self.error_details = kwargs.get('error_details', None) + self.status = kwargs.get('status', None) + + +class RangeBasedItemLevelRestoreCriteria(ItemLevelRestoreCriteria): + """Item Level target info for restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param min_matching_value: minimum value for range prefix match. + :type min_matching_value: str + :param max_matching_value: maximum value for range prefix match. + :type max_matching_value: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'min_matching_value': {'key': 'minMatchingValue', 'type': 'str'}, + 'max_matching_value': {'key': 'maxMatchingValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RangeBasedItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = 'RangeBasedItemLevelRestoreCriteria' # type: str + self.min_matching_value = kwargs.get('min_matching_value', None) + self.max_matching_value = kwargs.get('max_matching_value', None) + + +class RecoveryPointDataStoreDetails(msrest.serialization.Model): + """RecoveryPoint datastore details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: + :type creation_time: ~datetime.datetime + :param expiry_time: + :type expiry_time: ~datetime.datetime + :param id: + :type id: str + :param meta_data: + :type meta_data: str + :param state: + :type state: str + :param type: + :type type: str + :param visible: + :type visible: bool + :ivar rehydration_expiry_time: + :vartype rehydration_expiry_time: ~datetime.datetime + :ivar rehydration_status: Possible values include: "CREATE_IN_PROGRESS", "COMPLETED", + "DELETE_IN_PROGRESS", "DELETED", "FAILED". + :vartype rehydration_status: str or ~data_protection_client.models.RehydrationStatus + """ + + _validation = { + 'rehydration_expiry_time': {'readonly': True}, + 'rehydration_status': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'meta_data': {'key': 'metaData', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'rehydration_expiry_time': {'key': 'rehydrationExpiryTime', 'type': 'iso-8601'}, + 'rehydration_status': {'key': 'rehydrationStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoveryPointDataStoreDetails, self).__init__(**kwargs) + self.creation_time = kwargs.get('creation_time', None) + self.expiry_time = kwargs.get('expiry_time', None) + self.id = kwargs.get('id', None) + self.meta_data = kwargs.get('meta_data', None) + self.state = kwargs.get('state', None) + self.type = kwargs.get('type', None) + self.visible = kwargs.get('visible', None) + self.rehydration_expiry_time = None + self.rehydration_status = None + + +class RecoveryPointsFilters(msrest.serialization.Model): + """RecoveryPointsFilters. + + :param restore_point_data_store_id: + :type restore_point_data_store_id: str + :param is_visible: + :type is_visible: bool + :param start_date: + :type start_date: str + :param end_date: + :type end_date: str + :param extended_info: + :type extended_info: bool + :param restore_point_state: + :type restore_point_state: str + """ + + _attribute_map = { + 'restore_point_data_store_id': {'key': 'restorePointDataStoreId', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'bool'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'restore_point_state': {'key': 'restorePointState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoveryPointsFilters, self).__init__(**kwargs) + self.restore_point_data_store_id = kwargs.get('restore_point_data_store_id', None) + self.is_visible = kwargs.get('is_visible', None) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.extended_info = kwargs.get('extended_info', None) + self.restore_point_state = kwargs.get('restore_point_state', None) + + +class RestorableTimeRange(msrest.serialization.Model): + """RestorableTimeRange. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Start time for the available restore range. + :type start_time: str + :param end_time: Required. End time for the available restore range. + :type end_time: str + :param object_type: + :type object_type: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RestorableTimeRange, self).__init__(**kwargs) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.object_type = kwargs.get('object_type', None) + + +class RestoreFilesTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore as files target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param target_details: Required. Destination of RestoreAsFiles operation, when destination is + not a datasource. + :type target_details: ~data_protection_client.models.TargetDetails + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'target_details': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreFilesTargetInfo, self).__init__(**kwargs) + self.object_type = 'RestoreFilesTargetInfo' # type: str + self.target_details = kwargs['target_details'] + + +class RestoreJobRecoveryPointDetails(msrest.serialization.Model): + """RestoreJobRecoveryPointDetails. + + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_time: + :type recovery_point_time: ~datetime.datetime + """ + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointID', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreJobRecoveryPointDetails, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + + +class RestoreTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~data_protection_client.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~data_protection_client.models.DatasourceSet + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreTargetInfo, self).__init__(**kwargs) + self.object_type = 'RestoreTargetInfo' # type: str + self.datasource_info = kwargs['datasource_info'] + self.datasource_set_info = kwargs.get('datasource_set_info', None) + + +class RetentionTag(msrest.serialization.Model): + """Retention tag. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar e_tag: Retention Tag version. + :vartype e_tag: str + :ivar id: Retention Tag version. + :vartype id: str + :param tag_name: Required. Retention Tag Name to relate it to retention rule. + :type tag_name: str + """ + + _validation = { + 'e_tag': {'readonly': True}, + 'id': {'readonly': True}, + 'tag_name': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'tag_name': {'key': 'tagName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RetentionTag, self).__init__(**kwargs) + self.e_tag = None + self.id = None + self.tag_name = kwargs['tag_name'] + + +class ScheduleBasedBackupCriteria(BackupCriteria): + """Schedule based backup criteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param absolute_criteria: it contains absolute values like "AllBackup" / "FirstOfDay" / + "FirstOfWeek" / "FirstOfMonth" + and should be part of AbsoluteMarker enum. + :type absolute_criteria: list[str or ~data_protection_client.models.AbsoluteMarker] + :param days_of_month: This is day of the month from 1 to 28 other wise last of month. + :type days_of_month: list[~data_protection_client.models.Day] + :param days_of_the_week: It should be Sunday/Monday/T..../Saturday. + :type days_of_the_week: list[str or ~data_protection_client.models.DayOfWeek] + :param months_of_year: It should be January/February/....../December. + :type months_of_year: list[str or ~data_protection_client.models.Month] + :param schedule_times: List of schedule times for backup. + :type schedule_times: list[~datetime.datetime] + :param weeks_of_the_month: It should be First/Second/Third/Fourth/Last. + :type weeks_of_the_month: list[str or ~data_protection_client.models.WeekNumber] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'absolute_criteria': {'key': 'absoluteCriteria', 'type': '[str]'}, + 'days_of_month': {'key': 'daysOfMonth', 'type': '[Day]'}, + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'schedule_times': {'key': 'scheduleTimes', 'type': '[iso-8601]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleBasedBackupCriteria, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedBackupCriteria' # type: str + self.absolute_criteria = kwargs.get('absolute_criteria', None) + self.days_of_month = kwargs.get('days_of_month', None) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.months_of_year = kwargs.get('months_of_year', None) + self.schedule_times = kwargs.get('schedule_times', None) + self.weeks_of_the_month = kwargs.get('weeks_of_the_month', None) + + +class ScheduleBasedTriggerContext(TriggerContext): + """Schedule based trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param schedule: Required. Schedule for this backup. + :type schedule: ~data_protection_client.models.BackupSchedule + :param tagging_criteria: Required. List of tags that can be applicable for given schedule. + :type tagging_criteria: list[~data_protection_client.models.TaggingCriteria] + """ + + _validation = { + 'object_type': {'required': True}, + 'schedule': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'BackupSchedule'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': '[TaggingCriteria]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedTriggerContext' # type: str + self.schedule = kwargs['schedule'] + self.tagging_criteria = kwargs['tagging_criteria'] + + +class SourceLifeCycle(msrest.serialization.Model): + """Source LifeCycle. + + All required parameters must be populated in order to send to Azure. + + :param delete_after: Required. Delete Option. + :type delete_after: ~data_protection_client.models.DeleteOption + :param source_data_store: Required. DataStoreInfo base. + :type source_data_store: ~data_protection_client.models.DataStoreInfoBase + :param target_data_store_copy_settings: + :type target_data_store_copy_settings: list[~data_protection_client.models.TargetCopySetting] + """ + + _validation = { + 'delete_after': {'required': True}, + 'source_data_store': {'required': True}, + } + + _attribute_map = { + 'delete_after': {'key': 'deleteAfter', 'type': 'DeleteOption'}, + 'source_data_store': {'key': 'sourceDataStore', 'type': 'DataStoreInfoBase'}, + 'target_data_store_copy_settings': {'key': 'targetDataStoreCopySettings', 'type': '[TargetCopySetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceLifeCycle, self).__init__(**kwargs) + self.delete_after = kwargs['delete_after'] + self.source_data_store = kwargs['source_data_store'] + self.target_data_store_copy_settings = kwargs.get('target_data_store_copy_settings', None) + + +class StorageSetting(msrest.serialization.Model): + """Storage setting. + + :param datastore_type: Gets or sets the type of the datastore. Possible values include: + "ArchiveStore", "SnapshotStore", "VaultStore". + :type datastore_type: str or ~data_protection_client.models.StorageSettingStoreTypes + :param type: Gets or sets the type. Possible values include: "GeoRedundant", + "LocallyRedundant". + :type type: str or ~data_protection_client.models.StorageSettingTypes + """ + + _attribute_map = { + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageSetting, self).__init__(**kwargs) + self.datastore_type = kwargs.get('datastore_type', None) + self.type = kwargs.get('type', None) + + +class SupportedFeature(msrest.serialization.Model): + """Elements class for feature request. + + :param feature_name: support feature type. + :type feature_name: str + :param support_status: feature support status. Possible values include: "Invalid", + "NotSupported", "AlphaPreview", "PrivatePreview", "PublicPreview", "GenerallyAvailable". + :type support_status: str or ~data_protection_client.models.FeatureSupportStatus + :param exposure_controlled_features: support feature type. + :type exposure_controlled_features: list[str] + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + 'exposure_controlled_features': {'key': 'exposureControlledFeatures', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportedFeature, self).__init__(**kwargs) + self.feature_name = kwargs.get('feature_name', None) + self.support_status = kwargs.get('support_status', None) + self.exposure_controlled_features = kwargs.get('exposure_controlled_features', None) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~data_protection_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~data_protection_client.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TaggingCriteria(msrest.serialization.Model): + """Tagging criteria. + + All required parameters must be populated in order to send to Azure. + + :param criteria: Criteria which decides whether the tag can be applied to a triggered backup. + :type criteria: list[~data_protection_client.models.BackupCriteria] + :param is_default: Required. Specifies if tag is default. + :type is_default: bool + :param tagging_priority: Required. Retention Tag priority. + :type tagging_priority: long + :param tag_info: Required. Retention tag information. + :type tag_info: ~data_protection_client.models.RetentionTag + """ + + _validation = { + 'is_default': {'required': True}, + 'tagging_priority': {'required': True}, + 'tag_info': {'required': True}, + } + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[BackupCriteria]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'tagging_priority': {'key': 'taggingPriority', 'type': 'long'}, + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + **kwargs + ): + super(TaggingCriteria, self).__init__(**kwargs) + self.criteria = kwargs.get('criteria', None) + self.is_default = kwargs['is_default'] + self.tagging_priority = kwargs['tagging_priority'] + self.tag_info = kwargs['tag_info'] + + +class TargetCopySetting(msrest.serialization.Model): + """Target copy settings. + + All required parameters must be populated in order to send to Azure. + + :param copy_after: Required. It can be CustomCopyOption or ImmediateCopyOption. + :type copy_after: ~data_protection_client.models.CopyOption + :param data_store: Required. Info of target datastore. + :type data_store: ~data_protection_client.models.DataStoreInfoBase + """ + + _validation = { + 'copy_after': {'required': True}, + 'data_store': {'required': True}, + } + + _attribute_map = { + 'copy_after': {'key': 'copyAfter', 'type': 'CopyOption'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetCopySetting, self).__init__(**kwargs) + self.copy_after = kwargs['copy_after'] + self.data_store = kwargs['data_store'] + + +class TargetDetails(msrest.serialization.Model): + """Class encapsulating target details, used where the destination is not a datasource. + + All required parameters must be populated in order to send to Azure. + + :param file_prefix: Required. Restore operation may create multiple files inside location + pointed by Url + Below will be the common prefix for all of them. + :type file_prefix: str + :param restore_target_location_type: Required. Denotes the target location where the data will + be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + Possible values include: "Invalid", "AzureBlobs", "AzureFiles". + :type restore_target_location_type: str or + ~data_protection_client.models.RestoreTargetLocationType + :param url: Required. Url denoting the restore destination. It can point to container / file + share etc. + :type url: str + """ + + _validation = { + 'file_prefix': {'required': True}, + 'restore_target_location_type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'file_prefix': {'key': 'filePrefix', 'type': 'str'}, + 'restore_target_location_type': {'key': 'restoreTargetLocationType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetDetails, self).__init__(**kwargs) + self.file_prefix = kwargs['file_prefix'] + self.restore_target_location_type = kwargs['restore_target_location_type'] + self.url = kwargs['url'] + + +class TriggerBackupRequest(msrest.serialization.Model): + """Trigger backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_rule_options: Required. Name for the Rule of the Policy which needs to be applied + for this backup. + :type backup_rule_options: ~data_protection_client.models.AdHocBackupRuleOptions + """ + + _validation = { + 'backup_rule_options': {'required': True}, + } + + _attribute_map = { + 'backup_rule_options': {'key': 'backupRuleOptions', 'type': 'AdHocBackupRuleOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggerBackupRequest, self).__init__(**kwargs) + self.backup_rule_options = kwargs['backup_rule_options'] + + +class UserFacingError(msrest.serialization.Model): + """Error object used by layers that have access to localized content, and propagate that to user. + + :param code: Unique code for this error. + :type code: str + :param details: Additional related Errors. + :type details: list[~data_protection_client.models.UserFacingError] + :param inner_error: Inner Error. + :type inner_error: ~data_protection_client.models.InnerError + :param is_retryable: Whether the operation will be retryable or not. + :type is_retryable: bool + :param is_user_error: Whether the operation is due to a user error or service error. + :type is_user_error: bool + :param properties: Any key value pairs that can be injected inside error object. + :type properties: dict[str, str] + :param message: + :type message: str + :param recommended_action: RecommendedAction � localized. + :type recommended_action: list[str] + :param target: Target of the error. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[UserFacingError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'is_retryable': {'key': 'isRetryable', 'type': 'bool'}, + 'is_user_error': {'key': 'isUserError', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommended_action': {'key': 'recommendedAction', 'type': '[str]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserFacingError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + self.is_retryable = kwargs.get('is_retryable', None) + self.is_user_error = kwargs.get('is_user_error', None) + self.properties = kwargs.get('properties', None) + self.message = kwargs.get('message', None) + self.recommended_action = kwargs.get('recommended_action', None) + self.target = kwargs.get('target', None) + + +class ValidateForBackupRequest(msrest.serialization.Model): + """Validate for backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_instance: Required. Backup Instance. + :type backup_instance: ~data_protection_client.models.BackupInstance + """ + + _validation = { + 'backup_instance': {'required': True}, + } + + _attribute_map = { + 'backup_instance': {'key': 'backupInstance', 'type': 'BackupInstance'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateForBackupRequest, self).__init__(**kwargs) + self.backup_instance = kwargs['backup_instance'] + + +class ValidateRestoreRequestObject(msrest.serialization.Model): + """Validate restore request object. + + All required parameters must be populated in order to send to Azure. + + :param restore_request_object: Required. Gets or sets the restore request object. + :type restore_request_object: ~data_protection_client.models.AzureBackupRestoreRequest + """ + + _validation = { + 'restore_request_object': {'required': True}, + } + + _attribute_map = { + 'restore_request_object': {'key': 'restoreRequestObject', 'type': 'AzureBackupRestoreRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateRestoreRequestObject, self).__init__(**kwargs) + self.restore_request_object = kwargs['restore_request_object'] diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models_py3.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models_py3.py new file mode 100644 index 00000000000..c4d4ccc0004 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/models/_models_py3.py @@ -0,0 +1,4174 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._data_protection_client_enums import * + + +class DeleteOption(msrest.serialization.Model): + """Delete Option. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AbsoluteDeleteOption. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AbsoluteDeleteOption': 'AbsoluteDeleteOption'} + } + + def __init__( + self, + *, + duration: str, + **kwargs + ): + super(DeleteOption, self).__init__(**kwargs) + self.duration = duration + self.object_type = None # type: Optional[str] + + +class AbsoluteDeleteOption(DeleteOption): + """Delete option with duration. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + duration: str, + **kwargs + ): + super(AbsoluteDeleteOption, self).__init__(duration=duration, **kwargs) + self.object_type = 'AbsoluteDeleteOption' # type: str + + +class AdHocBackupRuleOptions(msrest.serialization.Model): + """Adhoc backup rules. + + All required parameters must be populated in order to send to Azure. + + :param rule_name: Required. Specify backup policy rule name. + :type rule_name: str + :param trigger_option: Required. Adhoc backup trigger option. + :type trigger_option: ~data_protection_client.models.AdhocBackupTriggerOption + """ + + _validation = { + 'rule_name': {'required': True}, + 'trigger_option': {'required': True}, + } + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'trigger_option': {'key': 'triggerOption', 'type': 'AdhocBackupTriggerOption'}, + } + + def __init__( + self, + *, + rule_name: str, + trigger_option: "AdhocBackupTriggerOption", + **kwargs + ): + super(AdHocBackupRuleOptions, self).__init__(**kwargs) + self.rule_name = rule_name + self.trigger_option = trigger_option + + +class AdhocBackupTriggerOption(msrest.serialization.Model): + """Adhoc backup trigger option. + + :param retention_tag_override: Specify retention override tag. + :type retention_tag_override: str + """ + + _attribute_map = { + 'retention_tag_override': {'key': 'retentionTagOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + retention_tag_override: Optional[str] = None, + **kwargs + ): + super(AdhocBackupTriggerOption, self).__init__(**kwargs) + self.retention_tag_override = retention_tag_override + + +class AdhocBasedTaggingCriteria(msrest.serialization.Model): + """Adhoc backup tagging criteria. + + :param tag_info: Retention tag information. + :type tag_info: ~data_protection_client.models.RetentionTag + """ + + _attribute_map = { + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + *, + tag_info: Optional["RetentionTag"] = None, + **kwargs + ): + super(AdhocBasedTaggingCriteria, self).__init__(**kwargs) + self.tag_info = tag_info + + +class TriggerContext(msrest.serialization.Model): + """Trigger context. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdhocBasedTriggerContext, ScheduleBasedTriggerContext. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AdhocBasedTriggerContext': 'AdhocBasedTriggerContext', 'ScheduleBasedTriggerContext': 'ScheduleBasedTriggerContext'} + } + + def __init__( + self, + **kwargs + ): + super(TriggerContext, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AdhocBasedTriggerContext(TriggerContext): + """Adhoc trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param tagging_criteria: Required. Tagging Criteria containing retention tag for adhoc backup. + :type tagging_criteria: ~data_protection_client.models.AdhocBasedTaggingCriteria + """ + + _validation = { + 'object_type': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': 'AdhocBasedTaggingCriteria'}, + } + + def __init__( + self, + *, + tagging_criteria: "AdhocBasedTaggingCriteria", + **kwargs + ): + super(AdhocBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'AdhocBasedTriggerContext' # type: str + self.tagging_criteria = tagging_criteria + + +class AzureBackupRecoveryPoint(msrest.serialization.Model): + """Azure backup recoveryPoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupDiscreteRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupDiscreteRecoveryPoint': 'AzureBackupDiscreteRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupDiscreteRecoveryPoint(AzureBackupRecoveryPoint): + """Azure backup discrete RecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: + :type friendly_name: str + :param recovery_point_data_stores_details: + :type recovery_point_data_stores_details: + list[~data_protection_client.models.RecoveryPointDataStoreDetails] + :param recovery_point_time: Required. + :type recovery_point_time: ~datetime.datetime + :param policy_name: + :type policy_name: str + :param policy_version: + :type policy_version: str + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_type: + :type recovery_point_type: str + :param retention_tag_name: + :type retention_tag_name: str + :param retention_tag_version: + :type retention_tag_version: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_data_stores_details': {'key': 'recoveryPointDataStoresDetails', 'type': '[RecoveryPointDataStoreDetails]'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'retention_tag_name': {'key': 'retentionTagName', 'type': 'str'}, + 'retention_tag_version': {'key': 'retentionTagVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + recovery_point_time: datetime.datetime, + friendly_name: Optional[str] = None, + recovery_point_data_stores_details: Optional[List["RecoveryPointDataStoreDetails"]] = None, + policy_name: Optional[str] = None, + policy_version: Optional[str] = None, + recovery_point_id: Optional[str] = None, + recovery_point_type: Optional[str] = None, + retention_tag_name: Optional[str] = None, + retention_tag_version: Optional[str] = None, + **kwargs + ): + super(AzureBackupDiscreteRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureBackupDiscreteRecoveryPoint' # type: str + self.friendly_name = friendly_name + self.recovery_point_data_stores_details = recovery_point_data_stores_details + self.recovery_point_time = recovery_point_time + self.policy_name = policy_name + self.policy_version = policy_version + self.recovery_point_id = recovery_point_id + self.recovery_point_type = recovery_point_type + self.retention_tag_name = retention_tag_name + self.retention_tag_version = retention_tag_version + + +class AzureBackupFindRestorableTimeRangesRequest(msrest.serialization.Model): + """List Restore Ranges Request. + + All required parameters must be populated in order to send to Azure. + + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "OperationalStore", "VaultStore", "ArchiveStore". + :type source_data_store_type: str or ~data_protection_client.models.RestoreSourceDataStoreType + :param start_time: Required. Start time for the List Restore Ranges request. + :type start_time: str + :param end_time: Required. End time for the List Restore Ranges request. + :type end_time: str + """ + + _validation = { + 'source_data_store_type': {'required': True}, + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + } + + def __init__( + self, + *, + source_data_store_type: Union[str, "RestoreSourceDataStoreType"], + start_time: str, + end_time: str, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequest, self).__init__(**kwargs) + self.source_data_store_type = source_data_store_type + self.start_time = start_time + self.end_time = end_time + + +class DppWorkerRequest(msrest.serialization.Model): + """DppWorkerRequest. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + subscription_id: Optional[str] = None, + uri: Optional[str] = None, + headers: Optional[Dict[str, List[str]]] = None, + supported_group_versions: Optional[List[str]] = None, + culture_info: Optional[str] = None, + parameters: Optional[Dict[str, str]] = None, + http_method: Optional[str] = None, + **kwargs + ): + super(DppWorkerRequest, self).__init__(**kwargs) + self.subscription_id = subscription_id + self.uri = uri + self.headers = headers + self.supported_group_versions = supported_group_versions + self.culture_info = culture_info + self.parameters = parameters + self.http_method = http_method + + +class AzureBackupFindRestorableTimeRangesRequestResource(DppWorkerRequest): + """List Restore Ranges Request. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + :param content: AzureBackupFindRestorableTimeRangesRequestResource content. + :type content: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesRequest + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'AzureBackupFindRestorableTimeRangesRequest'}, + } + + def __init__( + self, + *, + subscription_id: Optional[str] = None, + uri: Optional[str] = None, + headers: Optional[Dict[str, List[str]]] = None, + supported_group_versions: Optional[List[str]] = None, + culture_info: Optional[str] = None, + parameters: Optional[Dict[str, str]] = None, + http_method: Optional[str] = None, + content: Optional["AzureBackupFindRestorableTimeRangesRequest"] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequestResource, self).__init__(subscription_id=subscription_id, uri=uri, headers=headers, supported_group_versions=supported_group_versions, culture_info=culture_info, parameters=parameters, http_method=http_method, **kwargs) + self.content = content + + +class AzureBackupFindRestorableTimeRangesResponse(msrest.serialization.Model): + """List Restore Ranges Response. + + :param restorable_time_ranges: Returns the Restore Ranges available on the Backup Instance. + :type restorable_time_ranges: list[~data_protection_client.models.RestorableTimeRange] + :param object_type: + :type object_type: str + """ + + _attribute_map = { + 'restorable_time_ranges': {'key': 'restorableTimeRanges', 'type': '[RestorableTimeRange]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + restorable_time_ranges: Optional[List["RestorableTimeRange"]] = None, + object_type: Optional[str] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponse, self).__init__(**kwargs) + self.restorable_time_ranges = restorable_time_ranges + self.object_type = object_type + + +class DppResource(msrest.serialization.Model): + """Resource class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class AzureBackupFindRestorableTimeRangesResponseResource(DppResource): + """List Restore Ranges Response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupFindRestorableTimeRangesResponseResource properties. + :type properties: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupFindRestorableTimeRangesResponse'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupFindRestorableTimeRangesResponse"] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponseResource, self).__init__(**kwargs) + self.properties = properties + + +class AzureBackupJob(msrest.serialization.Model): + """AzureBackup Job Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param activity_id: Required. Job Activity Id. + :type activity_id: str + :param backup_instance_friendly_name: Required. Name of the Backup Instance. + :type backup_instance_friendly_name: str + :ivar backup_instance_id: ARM ID of the Backup Instance. + :vartype backup_instance_id: str + :param data_source_id: Required. ARM ID of the DataSource. + :type data_source_id: str + :param data_source_location: Required. Location of the DataSource. + :type data_source_location: str + :param data_source_name: Required. User Friendly Name of the DataSource. + :type data_source_name: str + :param data_source_set_name: Required. Data Source Set Name of the DataSource. + :type data_source_set_name: str + :param data_source_type: Required. Type of DataSource. + :type data_source_type: str + :param duration: Total run time of the job. ISO 8601 format. + :type duration: str + :ivar end_time: EndTime of the job(in UTC). + :vartype end_time: ~datetime.datetime + :ivar error_details: A List, detailing the errors related to the job. + :vartype error_details: list[~data_protection_client.models.UserFacingError] + :ivar extended_info: Extended Information about the job. + :vartype extended_info: ~data_protection_client.models.JobExtendedInfo + :param is_user_triggered: Required. Indicated that whether the job is adhoc(true) or + scheduled(false). + :type is_user_triggered: bool + :param operation: Required. It indicates the type of Job i.e. Backup:full/log/diff + ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. + :type operation: str + :param operation_category: Required. It indicates the type of Job i.e. + Backup/Restore/Tiering/Management. + :type operation_category: str + :ivar policy_id: ARM ID of the policy. + :vartype policy_id: str + :ivar policy_name: Name of the policy. + :vartype policy_name: str + :param progress_enabled: Required. Indicated whether progress is enabled for the job. + :type progress_enabled: bool + :ivar progress_url: Url which contains job's progress. + :vartype progress_url: str + :ivar restore_type: It indicates the sub type of operation i.e. in case of Restore it can be + ALR/OLR. + :vartype restore_type: str + :param source_resource_group: Required. Resource Group Name of the Datasource. + :type source_resource_group: str + :param source_subscription_id: Required. SubscriptionId corresponding to the DataSource. + :type source_subscription_id: str + :param start_time: Required. StartTime of the job(in UTC). + :type start_time: ~datetime.datetime + :param status: Required. Status of the job like + InProgress/Success/Failed/Cancelled/SuccessWithWarning. + :type status: str + :param subscription_id: Required. Subscription Id of the corresponding backup vault. + :type subscription_id: str + :param supported_actions: Required. List of supported actions. + :type supported_actions: list[str] + :param vault_name: Required. Name of the vault. + :type vault_name: str + :param etag: + :type etag: str + :param source_data_store_name: + :type source_data_store_name: str + :param destination_data_store_name: + :type destination_data_store_name: str + """ + + _validation = { + 'activity_id': {'required': True}, + 'backup_instance_friendly_name': {'required': True}, + 'backup_instance_id': {'readonly': True}, + 'data_source_id': {'required': True}, + 'data_source_location': {'required': True}, + 'data_source_name': {'required': True}, + 'data_source_set_name': {'required': True}, + 'data_source_type': {'required': True}, + 'end_time': {'readonly': True}, + 'error_details': {'readonly': True}, + 'extended_info': {'readonly': True}, + 'is_user_triggered': {'required': True}, + 'operation': {'required': True}, + 'operation_category': {'required': True}, + 'policy_id': {'readonly': True}, + 'policy_name': {'readonly': True}, + 'progress_enabled': {'required': True}, + 'progress_url': {'readonly': True}, + 'restore_type': {'readonly': True}, + 'source_resource_group': {'required': True}, + 'source_subscription_id': {'required': True}, + 'start_time': {'required': True}, + 'status': {'required': True}, + 'subscription_id': {'required': True}, + 'supported_actions': {'required': True}, + 'vault_name': {'required': True}, + } + + _attribute_map = { + 'activity_id': {'key': 'activityID', 'type': 'str'}, + 'backup_instance_friendly_name': {'key': 'backupInstanceFriendlyName', 'type': 'str'}, + 'backup_instance_id': {'key': 'backupInstanceId', 'type': 'str'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'data_source_location': {'key': 'dataSourceLocation', 'type': 'str'}, + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_set_name': {'key': 'dataSourceSetName', 'type': 'str'}, + 'data_source_type': {'key': 'dataSourceType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error_details': {'key': 'errorDetails', 'type': '[UserFacingError]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'JobExtendedInfo'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'operation_category': {'key': 'operationCategory', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'progress_enabled': {'key': 'progressEnabled', 'type': 'bool'}, + 'progress_url': {'key': 'progressUrl', 'type': 'str'}, + 'restore_type': {'key': 'restoreType', 'type': 'str'}, + 'source_resource_group': {'key': 'sourceResourceGroup', 'type': 'str'}, + 'source_subscription_id': {'key': 'sourceSubscriptionID', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'supported_actions': {'key': 'supportedActions', 'type': '[str]'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'source_data_store_name': {'key': 'sourceDataStoreName', 'type': 'str'}, + 'destination_data_store_name': {'key': 'destinationDataStoreName', 'type': 'str'}, + } + + def __init__( + self, + *, + activity_id: str, + backup_instance_friendly_name: str, + data_source_id: str, + data_source_location: str, + data_source_name: str, + data_source_set_name: str, + data_source_type: str, + is_user_triggered: bool, + operation: str, + operation_category: str, + progress_enabled: bool, + source_resource_group: str, + source_subscription_id: str, + start_time: datetime.datetime, + status: str, + subscription_id: str, + supported_actions: List[str], + vault_name: str, + duration: Optional[str] = None, + etag: Optional[str] = None, + source_data_store_name: Optional[str] = None, + destination_data_store_name: Optional[str] = None, + **kwargs + ): + super(AzureBackupJob, self).__init__(**kwargs) + self.activity_id = activity_id + self.backup_instance_friendly_name = backup_instance_friendly_name + self.backup_instance_id = None + self.data_source_id = data_source_id + self.data_source_location = data_source_location + self.data_source_name = data_source_name + self.data_source_set_name = data_source_set_name + self.data_source_type = data_source_type + self.duration = duration + self.end_time = None + self.error_details = None + self.extended_info = None + self.is_user_triggered = is_user_triggered + self.operation = operation + self.operation_category = operation_category + self.policy_id = None + self.policy_name = None + self.progress_enabled = progress_enabled + self.progress_url = None + self.restore_type = None + self.source_resource_group = source_resource_group + self.source_subscription_id = source_subscription_id + self.start_time = start_time + self.status = status + self.subscription_id = subscription_id + self.supported_actions = supported_actions + self.vault_name = vault_name + self.etag = etag + self.source_data_store_name = source_data_store_name + self.destination_data_store_name = destination_data_store_name + + +class AzureBackupJobResource(DppResource): + """AzureBackup Job Resource Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupJobResource properties. + :type properties: ~data_protection_client.models.AzureBackupJob + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupJob'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupJob"] = None, + **kwargs + ): + super(AzureBackupJobResource, self).__init__(**kwargs) + self.properties = properties + + +class DppResourceList(msrest.serialization.Model): + """ListResource. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(DppResourceList, self).__init__(**kwargs) + self.next_link = next_link + + +class AzureBackupJobResourceList(DppResourceList): + """List of AzureBackup Job resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.AzureBackupJobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupJobResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["AzureBackupJobResource"]] = None, + **kwargs + ): + super(AzureBackupJobResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BackupParameters(msrest.serialization.Model): + """BackupParameters base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupParams. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupParams': 'AzureBackupParams'} + } + + def __init__( + self, + **kwargs + ): + super(BackupParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupParams(BackupParameters): + """Azure backup parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param backup_type: Required. BackupType ; Full/Incremental etc. + :type backup_type: str + """ + + _validation = { + 'object_type': {'required': True}, + 'backup_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_type: str, + **kwargs + ): + super(AzureBackupParams, self).__init__(**kwargs) + self.object_type = 'AzureBackupParams' # type: str + self.backup_type = backup_type + + +class AzureBackupRestoreRequest(msrest.serialization.Model): + """Azure backup restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRecoveryPointBasedRestoreRequest, AzureBackupRecoveryTimeBasedRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRecoveryPointBasedRestoreRequest': 'AzureBackupRecoveryPointBasedRestoreRequest', 'AzureBackupRecoveryTimeBasedRestoreRequest': 'AzureBackupRecoveryTimeBasedRestoreRequest'} + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + **kwargs + ): + super(AzureBackupRestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.restore_target_info = restore_target_info + self.source_data_store_type = source_data_store_type + + +class AzureBackupRecoveryPointBasedRestoreRequest(AzureBackupRestoreRequest): + """Azure backup recoveryPoint based restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRestoreWithRehydrationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRestoreWithRehydrationRequest': 'AzureBackupRestoreWithRehydrationRequest'} + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_id: str, + **kwargs + ): + super(AzureBackupRecoveryPointBasedRestoreRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, **kwargs) + self.object_type = 'AzureBackupRecoveryPointBasedRestoreRequest' # type: str + self.recovery_point_id = recovery_point_id + + +class AzureBackupRecoveryPointResource(DppResource): + """Azure backup recoveryPoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: AzureBackupRecoveryPointResource properties. + :type properties: ~data_protection_client.models.AzureBackupRecoveryPoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupRecoveryPoint'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupRecoveryPoint"] = None, + **kwargs + ): + super(AzureBackupRecoveryPointResource, self).__init__(**kwargs) + self.properties = properties + + +class AzureBackupRecoveryPointResourceList(DppResourceList): + """Azure backup recoveryPoint resource list. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.AzureBackupRecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupRecoveryPointResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["AzureBackupRecoveryPointResource"]] = None, + **kwargs + ): + super(AzureBackupRecoveryPointResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class AzureBackupRecoveryTimeBasedRestoreRequest(AzureBackupRestoreRequest): + """AzureBackup RecoveryPointTime Based Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_time: Required. The recovery time in ISO 8601 format example - + 2020-08-14T17:30:00.0000000Z. + :type recovery_point_time: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_time: str, + **kwargs + ): + super(AzureBackupRecoveryTimeBasedRestoreRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, **kwargs) + self.object_type = 'AzureBackupRecoveryTimeBasedRestoreRequest' # type: str + self.recovery_point_time = recovery_point_time + + +class AzureBackupRehydrationRequest(msrest.serialization.Model): + """Azure Backup Rehydrate Request. + + All required parameters must be populated in order to send to Azure. + + :param recovery_point_id: Required. Id of the recovery point to be recovered. + :type recovery_point_id: str + :param rehydration_priority: Priority to be used for rehydration. Values High or Standard. + Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~data_protection_client.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'recovery_point_id': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + recovery_point_id: str, + rehydration_retention_duration: str, + rehydration_priority: Optional[Union[str, "RehydrationPriority"]] = None, + **kwargs + ): + super(AzureBackupRehydrationRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.rehydration_priority = rehydration_priority + self.rehydration_retention_duration = rehydration_retention_duration + + +class AzureBackupRestoreWithRehydrationRequest(AzureBackupRecoveryPointBasedRestoreRequest): + """AzureBackup Restore with Rehydration Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~data_protection_client.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~data_protection_client.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + :param rehydration_priority: Required. Priority to be used for rehydration. Values High or + Standard. Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~data_protection_client.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + 'rehydration_priority': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_id: str, + rehydration_priority: Union[str, "RehydrationPriority"], + rehydration_retention_duration: str, + **kwargs + ): + super(AzureBackupRestoreWithRehydrationRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, recovery_point_id=recovery_point_id, **kwargs) + self.object_type = 'AzureBackupRestoreWithRehydrationRequest' # type: str + self.rehydration_priority = rehydration_priority + self.rehydration_retention_duration = rehydration_retention_duration + + +class BasePolicyRule(msrest.serialization.Model): + """BasePolicy Rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRule, AzureRetentionRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRule': 'AzureBackupRule', 'AzureRetentionRule': 'AzureRetentionRule'} + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(BasePolicyRule, self).__init__(**kwargs) + self.name = name + self.object_type = None # type: Optional[str] + + +class AzureBackupRule(BasePolicyRule): + """Azure backup rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_parameters: BackupParameters base. + :type backup_parameters: ~data_protection_client.models.BackupParameters + :param data_store: Required. DataStoreInfo base. + :type data_store: ~data_protection_client.models.DataStoreInfoBase + :param trigger: Required. Trigger context. + :type trigger: ~data_protection_client.models.TriggerContext + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'data_store': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_parameters': {'key': 'backupParameters', 'type': 'BackupParameters'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerContext'}, + } + + def __init__( + self, + *, + name: str, + data_store: "DataStoreInfoBase", + trigger: "TriggerContext", + backup_parameters: Optional["BackupParameters"] = None, + **kwargs + ): + super(AzureBackupRule, self).__init__(name=name, **kwargs) + self.object_type = 'AzureBackupRule' # type: str + self.backup_parameters = backup_parameters + self.data_store = data_store + self.trigger = trigger + + +class DataStoreParameters(msrest.serialization.Model): + """Parameters for DataStore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureOperationalStoreParameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureOperationalStoreParameters': 'AzureOperationalStoreParameters'} + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + **kwargs + ): + super(DataStoreParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.data_store_type = data_store_type + + +class AzureOperationalStoreParameters(DataStoreParameters): + """Parameters for Operational-Tier DataStore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + :param resource_group_id: Gets or sets the Snapshot Resource Group Uri. + :type resource_group_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + resource_group_id: Optional[str] = None, + **kwargs + ): + super(AzureOperationalStoreParameters, self).__init__(data_store_type=data_store_type, **kwargs) + self.object_type = 'AzureOperationalStoreParameters' # type: str + self.resource_group_id = resource_group_id + + +class AzureRetentionRule(BasePolicyRule): + """Azure retention rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param is_default: + :type is_default: bool + :param lifecycles: Required. + :type lifecycles: list[~data_protection_client.models.SourceLifeCycle] + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'lifecycles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'lifecycles': {'key': 'lifecycles', 'type': '[SourceLifeCycle]'}, + } + + def __init__( + self, + *, + name: str, + lifecycles: List["SourceLifeCycle"], + is_default: Optional[bool] = None, + **kwargs + ): + super(AzureRetentionRule, self).__init__(name=name, **kwargs) + self.object_type = 'AzureRetentionRule' # type: str + self.is_default = is_default + self.lifecycles = lifecycles + + +class BackupCriteria(msrest.serialization.Model): + """BackupCriteria base class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduleBasedBackupCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ScheduleBasedBackupCriteria': 'ScheduleBasedBackupCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(BackupCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class BackupInstance(msrest.serialization.Model): + """Backup Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Gets or sets the Backup Instance friendly name. + :type friendly_name: str + :param data_source_info: Required. Gets or sets the data source information. + :type data_source_info: ~data_protection_client.models.Datasource + :param data_source_set_info: Gets or sets the data source set information. + :type data_source_set_info: ~data_protection_client.models.DatasourceSet + :param policy_info: Required. Gets or sets the policy information. + :type policy_info: ~data_protection_client.models.PolicyInfo + :ivar protection_status: Specifies the protection status of the resource. + :vartype protection_status: ~data_protection_client.models.ProtectionStatusDetails + :ivar current_protection_state: Specifies the current protection state of the resource. + Possible values include: "Invalid", "NotProtected", "ConfiguringProtection", + "ProtectionConfigured", "BackupSchedulesSuspended", "RetentionSchedulesSuspended", + "ProtectionStopped", "ProtectionError", "ConfiguringProtectionFailed", "SoftDeleting", + "SoftDeleted", "UpdatingProtection". + :vartype current_protection_state: str or ~data_protection_client.models.CurrentProtectionState + :ivar protection_error_details: Specifies the protection error of the resource. + :vartype protection_error_details: ~data_protection_client.models.UserFacingError + :ivar provisioning_state: Specifies the provisioning state of the resource i.e. + provisioning/updating/Succeeded/Failed. + :vartype provisioning_state: str + :param object_type: Required. + :type object_type: str + """ + + _validation = { + 'data_source_info': {'required': True}, + 'policy_info': {'required': True}, + 'protection_status': {'readonly': True}, + 'current_protection_state': {'readonly': True}, + 'protection_error_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'data_source_info': {'key': 'dataSourceInfo', 'type': 'Datasource'}, + 'data_source_set_info': {'key': 'dataSourceSetInfo', 'type': 'DatasourceSet'}, + 'policy_info': {'key': 'policyInfo', 'type': 'PolicyInfo'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'ProtectionStatusDetails'}, + 'current_protection_state': {'key': 'currentProtectionState', 'type': 'str'}, + 'protection_error_details': {'key': 'protectionErrorDetails', 'type': 'UserFacingError'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + data_source_info: "Datasource", + policy_info: "PolicyInfo", + object_type: str, + friendly_name: Optional[str] = None, + data_source_set_info: Optional["DatasourceSet"] = None, + **kwargs + ): + super(BackupInstance, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.data_source_info = data_source_info + self.data_source_set_info = data_source_set_info + self.policy_info = policy_info + self.protection_status = None + self.current_protection_state = None + self.protection_error_details = None + self.provisioning_state = None + self.object_type = object_type + + +class BackupInstanceResource(DppResource): + """BackupInstance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: BackupInstanceResource properties. + :type properties: ~data_protection_client.models.BackupInstance + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupInstance'}, + } + + def __init__( + self, + *, + properties: Optional["BackupInstance"] = None, + **kwargs + ): + super(BackupInstanceResource, self).__init__(**kwargs) + self.properties = properties + + +class BackupInstanceResourceList(DppResourceList): + """BackupInstance Resource list response. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BackupInstanceResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupInstanceResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BackupInstanceResource"]] = None, + **kwargs + ): + super(BackupInstanceResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BaseBackupPolicy(msrest.serialization.Model): + """BackupPolicy base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BackupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'BackupPolicy': 'BackupPolicy'} + } + + def __init__( + self, + *, + datasource_types: List[str], + **kwargs + ): + super(BaseBackupPolicy, self).__init__(**kwargs) + self.datasource_types = datasource_types + self.object_type = None # type: Optional[str] + + +class BackupPolicy(BaseBackupPolicy): + """Rule based backup policy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + :param policy_rules: Required. Policy rule dictionary that contains rules for each backuptype + i.e Full/Incremental/Logs etc. + :type policy_rules: list[~data_protection_client.models.BasePolicyRule] + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + 'policy_rules': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'policy_rules': {'key': 'policyRules', 'type': '[BasePolicyRule]'}, + } + + def __init__( + self, + *, + datasource_types: List[str], + policy_rules: List["BasePolicyRule"], + **kwargs + ): + super(BackupPolicy, self).__init__(datasource_types=datasource_types, **kwargs) + self.object_type = 'BackupPolicy' # type: str + self.policy_rules = policy_rules + + +class BackupSchedule(msrest.serialization.Model): + """Schedule for backup. + + All required parameters must be populated in order to send to Azure. + + :param repeating_time_intervals: Required. ISO 8601 repeating time interval format. + :type repeating_time_intervals: list[str] + """ + + _validation = { + 'repeating_time_intervals': {'required': True}, + } + + _attribute_map = { + 'repeating_time_intervals': {'key': 'repeatingTimeIntervals', 'type': '[str]'}, + } + + def __init__( + self, + *, + repeating_time_intervals: List[str], + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.repeating_time_intervals = repeating_time_intervals + + +class BackupVault(msrest.serialization.Model): + """Backup Vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~data_protection_client.models.ProvisioningState + :param storage_settings: Required. Storage Settings. + :type storage_settings: list[~data_protection_client.models.StorageSetting] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'storage_settings': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'storage_settings': {'key': 'storageSettings', 'type': '[StorageSetting]'}, + } + + def __init__( + self, + *, + storage_settings: List["StorageSetting"], + **kwargs + ): + super(BackupVault, self).__init__(**kwargs) + self.provisioning_state = None + self.storage_settings = storage_settings + + +class DppTrackedResource(msrest.serialization.Model): + """DppTrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + e_tag: Optional[str] = None, + identity: Optional["DppIdentityDetails"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DppTrackedResource, self).__init__(**kwargs) + self.e_tag = e_tag + self.id = None + self.identity = identity + self.location = location + self.name = None + self.tags = tags + self.type = None + self.system_data = None + + +class BackupVaultResource(DppTrackedResource): + """Backup Vault Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: Required. BackupVaultResource properties. + :type properties: ~data_protection_client.models.BackupVault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupVault'}, + } + + def __init__( + self, + *, + properties: "BackupVault", + e_tag: Optional[str] = None, + identity: Optional["DppIdentityDetails"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(BackupVaultResource, self).__init__(e_tag=e_tag, identity=identity, location=location, tags=tags, **kwargs) + self.properties = properties + + +class BackupVaultResourceList(DppResourceList): + """List of BackupVault resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BackupVaultResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupVaultResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BackupVaultResource"]] = None, + **kwargs + ): + super(BackupVaultResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BaseBackupPolicyResource(DppResource): + """BaseBackupPolicy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~data_protection_client.models.SystemData + :param properties: BaseBackupPolicyResource properties. + :type properties: ~data_protection_client.models.BaseBackupPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BaseBackupPolicy'}, + } + + def __init__( + self, + *, + properties: Optional["BaseBackupPolicy"] = None, + **kwargs + ): + super(BaseBackupPolicyResource, self).__init__(**kwargs) + self.properties = properties + + +class BaseBackupPolicyResourceList(DppResourceList): + """List of BaseBackupPolicy resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~data_protection_client.models.BaseBackupPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BaseBackupPolicyResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BaseBackupPolicyResource"]] = None, + **kwargs + ): + super(BaseBackupPolicyResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """CheckNameAvailability Request. + + :param name: Resource name for which availability needs to be checked. + :type name: str + :param type: Describes the Resource type: Microsoft.DataProtection/BackupVaults. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """CheckNameAvailability Result. + + :param message: Gets or sets the message. + :type message: str + :param name_available: Gets or sets a value indicating whether [name available]. + :type name_available: bool + :param reason: Gets or sets the reason. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + message: Optional[str] = None, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = message + self.name_available = name_available + self.reason = reason + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :param description: Description of the operation having details of what operation is about. + :type description: str + :param operation: Operations Name itself. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + operation: Optional[str] = None, + provider: Optional[str] = None, + resource: Optional[str] = None, + **kwargs + ): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :param blob_duration: blob duration of shoebox log specification. + :type blob_duration: str + :param display_name: Localized display name. + :type display_name: str + :param name: Name for shoebox log specification. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + blob_duration: Optional[str] = None, + display_name: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.blob_duration = blob_duration + self.display_name = display_name + self.name = name + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~data_protection_client.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ClientDiscoveryForServiceSpecification"] = None, + **kwargs + ): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~data_protection_client.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["ClientDiscoveryForLogSpecification"]] = None, + **kwargs + ): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :param next_link: Link to the next chunk of Response. + :type next_link: str + :param value: List of available operations. + :type value: list[~data_protection_client.models.ClientDiscoveryValueForSingleApi] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ClientDiscoveryValueForSingleApi"]] = None, + **kwargs + ): + super(ClientDiscoveryResponse, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :param display: Contains the localized display information for this particular operation. + :type display: ~data_protection_client.models.ClientDiscoveryDisplay + :param name: Name of the Operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Properties for the given operation. + :type properties: ~data_protection_client.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__( + self, + *, + display: Optional["ClientDiscoveryDisplay"] = None, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + origin: Optional[str] = None, + properties: Optional["ClientDiscoveryForProperties"] = None, + **kwargs + ): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.display = display + self.name = name + self.is_data_action = is_data_action + self.origin = origin + self.properties = properties + + +class CopyOption(msrest.serialization.Model): + """Options to copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CopyOnExpiryOption, CustomCopyOption, ImmediateCopyOption. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'CopyOnExpiryOption': 'CopyOnExpiryOption', 'CustomCopyOption': 'CustomCopyOption', 'ImmediateCopyOption': 'ImmediateCopyOption'} + } + + def __init__( + self, + **kwargs + ): + super(CopyOption, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class CopyOnExpiryOption(CopyOption): + """Copy on Expiry Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyOnExpiryOption, self).__init__(**kwargs) + self.object_type = 'CopyOnExpiryOption' # type: str + + +class CustomCopyOption(CopyOption): + """Duration based custom options to copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param duration: Data copied after given timespan. + :type duration: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + *, + duration: Optional[str] = None, + **kwargs + ): + super(CustomCopyOption, self).__init__(**kwargs) + self.object_type = 'CustomCopyOption' # type: str + self.duration = duration + + +class Datasource(msrest.serialization.Model): + """Datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: str, + datasource_type: Optional[str] = None, + object_type: Optional[str] = None, + resource_location: Optional[str] = None, + resource_name: Optional[str] = None, + resource_type: Optional[str] = None, + resource_uri: Optional[str] = None, + **kwargs + ): + super(Datasource, self).__init__(**kwargs) + self.datasource_type = datasource_type + self.object_type = object_type + self.resource_id = resource_id + self.resource_location = resource_location + self.resource_name = resource_name + self.resource_type = resource_type + self.resource_uri = resource_uri + + +class DatasourceSet(msrest.serialization.Model): + """DatasourceSet details of datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: str, + datasource_type: Optional[str] = None, + object_type: Optional[str] = None, + resource_location: Optional[str] = None, + resource_name: Optional[str] = None, + resource_type: Optional[str] = None, + resource_uri: Optional[str] = None, + **kwargs + ): + super(DatasourceSet, self).__init__(**kwargs) + self.datasource_type = datasource_type + self.object_type = object_type + self.resource_id = resource_id + self.resource_location = resource_location + self.resource_name = resource_name + self.resource_type = resource_type + self.resource_uri = resource_uri + + +class DataStoreInfoBase(msrest.serialization.Model): + """DataStoreInfo base. + + All required parameters must be populated in order to send to Azure. + + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~data_protection_client.models.DataStoreTypes + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type. + :type object_type: str + """ + + _validation = { + 'data_store_type': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + object_type: str, + **kwargs + ): + super(DataStoreInfoBase, self).__init__(**kwargs) + self.data_store_type = data_store_type + self.object_type = object_type + + +class Day(msrest.serialization.Model): + """Day of the week. + + :param date: Date of the month. + :type date: int + :param is_last: Whether Date is last date of month. + :type is_last: bool + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__( + self, + *, + date: Optional[int] = None, + is_last: Optional[bool] = None, + **kwargs + ): + super(Day, self).__init__(**kwargs) + self.date = date + self.is_last = is_last + + +class DppIdentityDetails(msrest.serialization.Model): + """Identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object ID of the service principal object for the managed identity that + is used to grant role-based access to an Azure resource. + :vartype principal_id: str + :ivar tenant_id: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where + the resource is now a member. + :vartype tenant_id: str + :param type: The identityType which can be either SystemAssigned or None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + **kwargs + ): + super(DppIdentityDetails, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class DppTrackedResourceList(msrest.serialization.Model): + """DppTrackedResourceList. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(DppTrackedResourceList, self).__init__(**kwargs) + self.next_link = next_link + + +class Error(msrest.serialization.Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_info: The error additional info. + :vartype additional_info: list[~data_protection_client.models.ErrorAdditionalInfo] + :ivar code: The error code. + :vartype code: str + :ivar details: The error details. + :vartype details: list[~data_protection_client.models.Error] + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + """ + + _validation = { + 'additional_info': {'readonly': True}, + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.additional_info = None + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar info: The additional info. + :vartype info: object + :ivar type: The additional info type. + :vartype type: str + """ + + _validation = { + 'info': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'info': {'key': 'info', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.info = None + self.type = None + + +class ExportJobsResult(msrest.serialization.Model): + """The result for export jobs containing blob details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the ExcelFile blob. + :vartype excel_file_blob_sas_key: str + """ + + _validation = { + 'blob_url': {'readonly': True}, + 'blob_sas_key': {'readonly': True}, + 'excel_file_blob_url': {'readonly': True}, + 'excel_file_blob_sas_key': {'readonly': True}, + } + + _attribute_map = { + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportJobsResult, self).__init__(**kwargs) + self.blob_url = None + self.blob_sas_key = None + self.excel_file_blob_url = None + self.excel_file_blob_sas_key = None + + +class FeatureValidationRequestBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationRequest': 'FeatureValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequestBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationRequest(FeatureValidationRequestBase): + """Base class for feature object. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~data_protection_client.models.FeatureType + :param feature_name: backup support feature name. + :type feature_name: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'feature_name': {'key': 'featureName', 'type': 'str'}, + } + + def __init__( + self, + *, + feature_type: Optional[Union[str, "FeatureType"]] = None, + feature_name: Optional[str] = None, + **kwargs + ): + super(FeatureValidationRequest, self).__init__(**kwargs) + self.object_type = 'FeatureValidationRequest' # type: str + self.feature_type = feature_type + self.feature_name = feature_name + + +class FeatureValidationResponseBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationResponse. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationResponse': 'FeatureValidationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponseBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationResponse(FeatureValidationResponseBase): + """Feature Validation Response. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~data_protection_client.models.FeatureType + :param features: Response features. + :type features: list[~data_protection_client.models.SupportedFeature] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SupportedFeature]'}, + } + + def __init__( + self, + *, + feature_type: Optional[Union[str, "FeatureType"]] = None, + features: Optional[List["SupportedFeature"]] = None, + **kwargs + ): + super(FeatureValidationResponse, self).__init__(**kwargs) + self.object_type = 'FeatureValidationResponse' # type: str + self.feature_type = feature_type + self.features = features + + +class ImmediateCopyOption(CopyOption): + """Immediate copy Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImmediateCopyOption, self).__init__(**kwargs) + self.object_type = 'ImmediateCopyOption' # type: str + + +class InnerError(msrest.serialization.Model): + """Inner Error. + + :param additional_info: Any Key value pairs that can be provided to the client for additional + verbose information. + :type additional_info: dict[str, str] + :param code: Unique code for this error. + :type code: str + :param embedded_inner_error: Child Inner Error, to allow Nesting. + :type embedded_inner_error: ~data_protection_client.models.InnerError + """ + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '{str}'}, + 'code': {'key': 'code', 'type': 'str'}, + 'embedded_inner_error': {'key': 'embeddedInnerError', 'type': 'InnerError'}, + } + + def __init__( + self, + *, + additional_info: Optional[Dict[str, str]] = None, + code: Optional[str] = None, + embedded_inner_error: Optional["InnerError"] = None, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.additional_info = additional_info + self.code = code + self.embedded_inner_error = embedded_inner_error + + +class ItemLevelRestoreCriteria(msrest.serialization.Model): + """Class to contain criteria for item level restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RangeBasedItemLevelRestoreCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'RangeBasedItemLevelRestoreCriteria': 'RangeBasedItemLevelRestoreCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class RestoreTargetInfoBase(msrest.serialization.Model): + """Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ItemLevelRestoreTargetInfo, RestoreFilesTargetInfo, RestoreTargetInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ItemLevelRestoreTargetInfo': 'ItemLevelRestoreTargetInfo', 'RestoreFilesTargetInfo': 'RestoreFilesTargetInfo', 'RestoreTargetInfo': 'RestoreTargetInfo'} + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + restore_location: Optional[str] = None, + **kwargs + ): + super(RestoreTargetInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.recovery_option = recovery_option + self.restore_location = restore_location + + +class ItemLevelRestoreTargetInfo(RestoreTargetInfoBase): + """Restore target info for Item level restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param restore_criteria: Required. Restore Criteria. + :type restore_criteria: list[~data_protection_client.models.ItemLevelRestoreCriteria] + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~data_protection_client.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~data_protection_client.models.DatasourceSet + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'restore_criteria': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'restore_criteria': {'key': 'restoreCriteria', 'type': '[ItemLevelRestoreCriteria]'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + restore_criteria: List["ItemLevelRestoreCriteria"], + datasource_info: "Datasource", + restore_location: Optional[str] = None, + datasource_set_info: Optional["DatasourceSet"] = None, + **kwargs + ): + super(ItemLevelRestoreTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'ItemLevelRestoreTargetInfo' # type: str + self.restore_criteria = restore_criteria + self.datasource_info = datasource_info + self.datasource_set_info = datasource_set_info + + +class JobExtendedInfo(msrest.serialization.Model): + """Extended Information about the job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param additional_details: Job's Additional Details. + :type additional_details: dict[str, str] + :ivar backup_instance_state: State of the Backup Instance. + :vartype backup_instance_state: str + :ivar data_transferred_in_bytes: Number of bytes transferred. + :vartype data_transferred_in_bytes: float + :ivar recovery_destination: Destination where restore is done. + :vartype recovery_destination: str + :ivar source_recover_point: Details of the Source Recovery Point. + :vartype source_recover_point: ~data_protection_client.models.RestoreJobRecoveryPointDetails + :ivar sub_tasks: List of Sub Tasks of the job. + :vartype sub_tasks: list[~data_protection_client.models.JobSubTask] + :ivar target_recover_point: Details of the Target Recovery Point. + :vartype target_recover_point: ~data_protection_client.models.RestoreJobRecoveryPointDetails + """ + + _validation = { + 'backup_instance_state': {'readonly': True}, + 'data_transferred_in_bytes': {'readonly': True}, + 'recovery_destination': {'readonly': True}, + 'source_recover_point': {'readonly': True}, + 'sub_tasks': {'readonly': True}, + 'target_recover_point': {'readonly': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'backup_instance_state': {'key': 'backupInstanceState', 'type': 'str'}, + 'data_transferred_in_bytes': {'key': 'dataTransferredInBytes', 'type': 'float'}, + 'recovery_destination': {'key': 'recoveryDestination', 'type': 'str'}, + 'source_recover_point': {'key': 'sourceRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + 'sub_tasks': {'key': 'subTasks', 'type': '[JobSubTask]'}, + 'target_recover_point': {'key': 'targetRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + } + + def __init__( + self, + *, + additional_details: Optional[Dict[str, str]] = None, + **kwargs + ): + super(JobExtendedInfo, self).__init__(**kwargs) + self.additional_details = additional_details + self.backup_instance_state = None + self.data_transferred_in_bytes = None + self.recovery_destination = None + self.source_recover_point = None + self.sub_tasks = None + self.target_recover_point = None + + +class JobSubTask(msrest.serialization.Model): + """Details of Job's Sub Task. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_details: Additional details of Sub Tasks. + :type additional_details: dict[str, str] + :param task_id: Required. Task Id of the Sub Task. + :type task_id: int + :param task_name: Required. Name of the Sub Task. + :type task_name: str + :ivar task_progress: Progress of the Sub Task. + :vartype task_progress: str + :param task_status: Required. Status of the Sub Task. + :type task_status: str + """ + + _validation = { + 'task_id': {'required': True}, + 'task_name': {'required': True}, + 'task_progress': {'readonly': True}, + 'task_status': {'required': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'task_id': {'key': 'taskId', 'type': 'int'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'task_progress': {'key': 'taskProgress', 'type': 'str'}, + 'task_status': {'key': 'taskStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: int, + task_name: str, + task_status: str, + additional_details: Optional[Dict[str, str]] = None, + **kwargs + ): + super(JobSubTask, self).__init__(**kwargs) + self.additional_details = additional_details + self.task_id = task_id + self.task_name = task_name + self.task_progress = None + self.task_status = task_status + + +class OperationExtendedInfo(msrest.serialization.Model): + """Operation Extended Info. + + :param object_type: This property will be used as the discriminator for deciding the specific + types in the polymorphic chain of types. + :type object_type: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + object_type: Optional[str] = None, + **kwargs + ): + super(OperationExtendedInfo, self).__init__(**kwargs) + self.object_type = object_type + + +class OperationJobExtendedInfo(OperationExtendedInfo): + """Operation Job Extended Info. + + :param object_type: This property will be used as the discriminator for deciding the specific + types in the polymorphic chain of types. + :type object_type: str + :param job_id: Arm Id of the job created for this operation. + :type job_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + *, + object_type: Optional[str] = None, + job_id: Optional[str] = None, + **kwargs + ): + super(OperationJobExtendedInfo, self).__init__(object_type=object_type, **kwargs) + self.job_id = job_id + + +class OperationResource(msrest.serialization.Model): + """Operation Resource. + + :param end_time: End time of the operation. + :type end_time: ~datetime.datetime + :param error: Required if status == failed or status == canceled. This is the OData v4 error + format, used by the RPC and will go into the v2.2 Azure REST API guidelines. + The full set of optional properties (e.g. inner errors / details) can be found in the "Error + Response" section. + :type error: ~data_protection_client.models.Error + :param id: It should match what is used to GET the operation result. + :type id: str + :param name: It must match the last segment of the "id" field, and will typically be a GUID / + system generated value. + :type name: str + :param properties: End time of the operation. + :type properties: ~data_protection_client.models.OperationExtendedInfo + :param start_time: Start time of the operation. + :type start_time: ~datetime.datetime + :param status: + :type status: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationExtendedInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + end_time: Optional[datetime.datetime] = None, + error: Optional["Error"] = None, + id: Optional[str] = None, + name: Optional[str] = None, + properties: Optional["OperationExtendedInfo"] = None, + start_time: Optional[datetime.datetime] = None, + status: Optional[str] = None, + **kwargs + ): + super(OperationResource, self).__init__(**kwargs) + self.end_time = end_time + self.error = error + self.id = id + self.name = name + self.properties = properties + self.start_time = start_time + self.status = status + + +class PatchResourceRequestInput(msrest.serialization.Model): + """Patch Request content for Microsoft.DataProtection resources. + + :param identity: Input Managed Identity Details. + :type identity: ~data_protection_client.models.DppIdentityDetails + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["DppIdentityDetails"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(PatchResourceRequestInput, self).__init__(**kwargs) + self.identity = identity + self.tags = tags + + +class PolicyInfo(msrest.serialization.Model): + """Policy Info in backupInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param policy_id: Required. + :type policy_id: str + :ivar policy_version: + :vartype policy_version: str + :param policy_parameters: Policy parameters for the backup instance. + :type policy_parameters: ~data_protection_client.models.PolicyParameters + """ + + _validation = { + 'policy_id': {'required': True}, + 'policy_version': {'readonly': True}, + } + + _attribute_map = { + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'policy_parameters': {'key': 'policyParameters', 'type': 'PolicyParameters'}, + } + + def __init__( + self, + *, + policy_id: str, + policy_parameters: Optional["PolicyParameters"] = None, + **kwargs + ): + super(PolicyInfo, self).__init__(**kwargs) + self.policy_id = policy_id + self.policy_version = None + self.policy_parameters = policy_parameters + + +class PolicyParameters(msrest.serialization.Model): + """Parameters in Policy. + + :param data_store_parameters_list: Gets or sets the DataStore Parameters. + :type data_store_parameters_list: list[~data_protection_client.models.DataStoreParameters] + """ + + _attribute_map = { + 'data_store_parameters_list': {'key': 'dataStoreParametersList', 'type': '[DataStoreParameters]'}, + } + + def __init__( + self, + *, + data_store_parameters_list: Optional[List["DataStoreParameters"]] = None, + **kwargs + ): + super(PolicyParameters, self).__init__(**kwargs) + self.data_store_parameters_list = data_store_parameters_list + + +class ProtectionStatusDetails(msrest.serialization.Model): + """Protection status details. + + :param error_details: Specifies the protection status error of the resource. + :type error_details: ~data_protection_client.models.UserFacingError + :param status: Specifies the protection status of the resource. Possible values include: + "ConfiguringProtection", "ConfiguringProtectionFailed", "ProtectionConfigured", + "ProtectionStopped", "SoftDeleted", "SoftDeleting". + :type status: str or ~data_protection_client.models.Status + """ + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': 'UserFacingError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + error_details: Optional["UserFacingError"] = None, + status: Optional[Union[str, "Status"]] = None, + **kwargs + ): + super(ProtectionStatusDetails, self).__init__(**kwargs) + self.error_details = error_details + self.status = status + + +class RangeBasedItemLevelRestoreCriteria(ItemLevelRestoreCriteria): + """Item Level target info for restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param min_matching_value: minimum value for range prefix match. + :type min_matching_value: str + :param max_matching_value: maximum value for range prefix match. + :type max_matching_value: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'min_matching_value': {'key': 'minMatchingValue', 'type': 'str'}, + 'max_matching_value': {'key': 'maxMatchingValue', 'type': 'str'}, + } + + def __init__( + self, + *, + min_matching_value: Optional[str] = None, + max_matching_value: Optional[str] = None, + **kwargs + ): + super(RangeBasedItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = 'RangeBasedItemLevelRestoreCriteria' # type: str + self.min_matching_value = min_matching_value + self.max_matching_value = max_matching_value + + +class RecoveryPointDataStoreDetails(msrest.serialization.Model): + """RecoveryPoint datastore details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: + :type creation_time: ~datetime.datetime + :param expiry_time: + :type expiry_time: ~datetime.datetime + :param id: + :type id: str + :param meta_data: + :type meta_data: str + :param state: + :type state: str + :param type: + :type type: str + :param visible: + :type visible: bool + :ivar rehydration_expiry_time: + :vartype rehydration_expiry_time: ~datetime.datetime + :ivar rehydration_status: Possible values include: "CREATE_IN_PROGRESS", "COMPLETED", + "DELETE_IN_PROGRESS", "DELETED", "FAILED". + :vartype rehydration_status: str or ~data_protection_client.models.RehydrationStatus + """ + + _validation = { + 'rehydration_expiry_time': {'readonly': True}, + 'rehydration_status': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'meta_data': {'key': 'metaData', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'rehydration_expiry_time': {'key': 'rehydrationExpiryTime', 'type': 'iso-8601'}, + 'rehydration_status': {'key': 'rehydrationStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + creation_time: Optional[datetime.datetime] = None, + expiry_time: Optional[datetime.datetime] = None, + id: Optional[str] = None, + meta_data: Optional[str] = None, + state: Optional[str] = None, + type: Optional[str] = None, + visible: Optional[bool] = None, + **kwargs + ): + super(RecoveryPointDataStoreDetails, self).__init__(**kwargs) + self.creation_time = creation_time + self.expiry_time = expiry_time + self.id = id + self.meta_data = meta_data + self.state = state + self.type = type + self.visible = visible + self.rehydration_expiry_time = None + self.rehydration_status = None + + +class RecoveryPointsFilters(msrest.serialization.Model): + """RecoveryPointsFilters. + + :param restore_point_data_store_id: + :type restore_point_data_store_id: str + :param is_visible: + :type is_visible: bool + :param start_date: + :type start_date: str + :param end_date: + :type end_date: str + :param extended_info: + :type extended_info: bool + :param restore_point_state: + :type restore_point_state: str + """ + + _attribute_map = { + 'restore_point_data_store_id': {'key': 'restorePointDataStoreId', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'bool'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'restore_point_state': {'key': 'restorePointState', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_point_data_store_id: Optional[str] = None, + is_visible: Optional[bool] = None, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + extended_info: Optional[bool] = None, + restore_point_state: Optional[str] = None, + **kwargs + ): + super(RecoveryPointsFilters, self).__init__(**kwargs) + self.restore_point_data_store_id = restore_point_data_store_id + self.is_visible = is_visible + self.start_date = start_date + self.end_date = end_date + self.extended_info = extended_info + self.restore_point_state = restore_point_state + + +class RestorableTimeRange(msrest.serialization.Model): + """RestorableTimeRange. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Start time for the available restore range. + :type start_time: str + :param end_time: Required. End time for the available restore range. + :type end_time: str + :param object_type: + :type object_type: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: str, + end_time: str, + object_type: Optional[str] = None, + **kwargs + ): + super(RestorableTimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.object_type = object_type + + +class RestoreFilesTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore as files target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param target_details: Required. Destination of RestoreAsFiles operation, when destination is + not a datasource. + :type target_details: ~data_protection_client.models.TargetDetails + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'target_details': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetDetails'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + target_details: "TargetDetails", + restore_location: Optional[str] = None, + **kwargs + ): + super(RestoreFilesTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'RestoreFilesTargetInfo' # type: str + self.target_details = target_details + + +class RestoreJobRecoveryPointDetails(msrest.serialization.Model): + """RestoreJobRecoveryPointDetails. + + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_time: + :type recovery_point_time: ~datetime.datetime + """ + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointID', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recovery_point_id: Optional[str] = None, + recovery_point_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(RestoreJobRecoveryPointDetails, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.recovery_point_time = recovery_point_time + + +class RestoreTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~data_protection_client.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~data_protection_client.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~data_protection_client.models.DatasourceSet + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + datasource_info: "Datasource", + restore_location: Optional[str] = None, + datasource_set_info: Optional["DatasourceSet"] = None, + **kwargs + ): + super(RestoreTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'RestoreTargetInfo' # type: str + self.datasource_info = datasource_info + self.datasource_set_info = datasource_set_info + + +class RetentionTag(msrest.serialization.Model): + """Retention tag. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar e_tag: Retention Tag version. + :vartype e_tag: str + :ivar id: Retention Tag version. + :vartype id: str + :param tag_name: Required. Retention Tag Name to relate it to retention rule. + :type tag_name: str + """ + + _validation = { + 'e_tag': {'readonly': True}, + 'id': {'readonly': True}, + 'tag_name': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'tag_name': {'key': 'tagName', 'type': 'str'}, + } + + def __init__( + self, + *, + tag_name: str, + **kwargs + ): + super(RetentionTag, self).__init__(**kwargs) + self.e_tag = None + self.id = None + self.tag_name = tag_name + + +class ScheduleBasedBackupCriteria(BackupCriteria): + """Schedule based backup criteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param absolute_criteria: it contains absolute values like "AllBackup" / "FirstOfDay" / + "FirstOfWeek" / "FirstOfMonth" + and should be part of AbsoluteMarker enum. + :type absolute_criteria: list[str or ~data_protection_client.models.AbsoluteMarker] + :param days_of_month: This is day of the month from 1 to 28 other wise last of month. + :type days_of_month: list[~data_protection_client.models.Day] + :param days_of_the_week: It should be Sunday/Monday/T..../Saturday. + :type days_of_the_week: list[str or ~data_protection_client.models.DayOfWeek] + :param months_of_year: It should be January/February/....../December. + :type months_of_year: list[str or ~data_protection_client.models.Month] + :param schedule_times: List of schedule times for backup. + :type schedule_times: list[~datetime.datetime] + :param weeks_of_the_month: It should be First/Second/Third/Fourth/Last. + :type weeks_of_the_month: list[str or ~data_protection_client.models.WeekNumber] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'absolute_criteria': {'key': 'absoluteCriteria', 'type': '[str]'}, + 'days_of_month': {'key': 'daysOfMonth', 'type': '[Day]'}, + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'schedule_times': {'key': 'scheduleTimes', 'type': '[iso-8601]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + def __init__( + self, + *, + absolute_criteria: Optional[List[Union[str, "AbsoluteMarker"]]] = None, + days_of_month: Optional[List["Day"]] = None, + days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, + months_of_year: Optional[List[Union[str, "Month"]]] = None, + schedule_times: Optional[List[datetime.datetime]] = None, + weeks_of_the_month: Optional[List[Union[str, "WeekNumber"]]] = None, + **kwargs + ): + super(ScheduleBasedBackupCriteria, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedBackupCriteria' # type: str + self.absolute_criteria = absolute_criteria + self.days_of_month = days_of_month + self.days_of_the_week = days_of_the_week + self.months_of_year = months_of_year + self.schedule_times = schedule_times + self.weeks_of_the_month = weeks_of_the_month + + +class ScheduleBasedTriggerContext(TriggerContext): + """Schedule based trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param schedule: Required. Schedule for this backup. + :type schedule: ~data_protection_client.models.BackupSchedule + :param tagging_criteria: Required. List of tags that can be applicable for given schedule. + :type tagging_criteria: list[~data_protection_client.models.TaggingCriteria] + """ + + _validation = { + 'object_type': {'required': True}, + 'schedule': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'BackupSchedule'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': '[TaggingCriteria]'}, + } + + def __init__( + self, + *, + schedule: "BackupSchedule", + tagging_criteria: List["TaggingCriteria"], + **kwargs + ): + super(ScheduleBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedTriggerContext' # type: str + self.schedule = schedule + self.tagging_criteria = tagging_criteria + + +class SourceLifeCycle(msrest.serialization.Model): + """Source LifeCycle. + + All required parameters must be populated in order to send to Azure. + + :param delete_after: Required. Delete Option. + :type delete_after: ~data_protection_client.models.DeleteOption + :param source_data_store: Required. DataStoreInfo base. + :type source_data_store: ~data_protection_client.models.DataStoreInfoBase + :param target_data_store_copy_settings: + :type target_data_store_copy_settings: list[~data_protection_client.models.TargetCopySetting] + """ + + _validation = { + 'delete_after': {'required': True}, + 'source_data_store': {'required': True}, + } + + _attribute_map = { + 'delete_after': {'key': 'deleteAfter', 'type': 'DeleteOption'}, + 'source_data_store': {'key': 'sourceDataStore', 'type': 'DataStoreInfoBase'}, + 'target_data_store_copy_settings': {'key': 'targetDataStoreCopySettings', 'type': '[TargetCopySetting]'}, + } + + def __init__( + self, + *, + delete_after: "DeleteOption", + source_data_store: "DataStoreInfoBase", + target_data_store_copy_settings: Optional[List["TargetCopySetting"]] = None, + **kwargs + ): + super(SourceLifeCycle, self).__init__(**kwargs) + self.delete_after = delete_after + self.source_data_store = source_data_store + self.target_data_store_copy_settings = target_data_store_copy_settings + + +class StorageSetting(msrest.serialization.Model): + """Storage setting. + + :param datastore_type: Gets or sets the type of the datastore. Possible values include: + "ArchiveStore", "SnapshotStore", "VaultStore". + :type datastore_type: str or ~data_protection_client.models.StorageSettingStoreTypes + :param type: Gets or sets the type. Possible values include: "GeoRedundant", + "LocallyRedundant". + :type type: str or ~data_protection_client.models.StorageSettingTypes + """ + + _attribute_map = { + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + datastore_type: Optional[Union[str, "StorageSettingStoreTypes"]] = None, + type: Optional[Union[str, "StorageSettingTypes"]] = None, + **kwargs + ): + super(StorageSetting, self).__init__(**kwargs) + self.datastore_type = datastore_type + self.type = type + + +class SupportedFeature(msrest.serialization.Model): + """Elements class for feature request. + + :param feature_name: support feature type. + :type feature_name: str + :param support_status: feature support status. Possible values include: "Invalid", + "NotSupported", "AlphaPreview", "PrivatePreview", "PublicPreview", "GenerallyAvailable". + :type support_status: str or ~data_protection_client.models.FeatureSupportStatus + :param exposure_controlled_features: support feature type. + :type exposure_controlled_features: list[str] + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + 'exposure_controlled_features': {'key': 'exposureControlledFeatures', 'type': '[str]'}, + } + + def __init__( + self, + *, + feature_name: Optional[str] = None, + support_status: Optional[Union[str, "FeatureSupportStatus"]] = None, + exposure_controlled_features: Optional[List[str]] = None, + **kwargs + ): + super(SupportedFeature, self).__init__(**kwargs) + self.feature_name = feature_name + self.support_status = support_status + self.exposure_controlled_features = exposure_controlled_features + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~data_protection_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~data_protection_client.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TaggingCriteria(msrest.serialization.Model): + """Tagging criteria. + + All required parameters must be populated in order to send to Azure. + + :param criteria: Criteria which decides whether the tag can be applied to a triggered backup. + :type criteria: list[~data_protection_client.models.BackupCriteria] + :param is_default: Required. Specifies if tag is default. + :type is_default: bool + :param tagging_priority: Required. Retention Tag priority. + :type tagging_priority: long + :param tag_info: Required. Retention tag information. + :type tag_info: ~data_protection_client.models.RetentionTag + """ + + _validation = { + 'is_default': {'required': True}, + 'tagging_priority': {'required': True}, + 'tag_info': {'required': True}, + } + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[BackupCriteria]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'tagging_priority': {'key': 'taggingPriority', 'type': 'long'}, + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + *, + is_default: bool, + tagging_priority: int, + tag_info: "RetentionTag", + criteria: Optional[List["BackupCriteria"]] = None, + **kwargs + ): + super(TaggingCriteria, self).__init__(**kwargs) + self.criteria = criteria + self.is_default = is_default + self.tagging_priority = tagging_priority + self.tag_info = tag_info + + +class TargetCopySetting(msrest.serialization.Model): + """Target copy settings. + + All required parameters must be populated in order to send to Azure. + + :param copy_after: Required. It can be CustomCopyOption or ImmediateCopyOption. + :type copy_after: ~data_protection_client.models.CopyOption + :param data_store: Required. Info of target datastore. + :type data_store: ~data_protection_client.models.DataStoreInfoBase + """ + + _validation = { + 'copy_after': {'required': True}, + 'data_store': {'required': True}, + } + + _attribute_map = { + 'copy_after': {'key': 'copyAfter', 'type': 'CopyOption'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + } + + def __init__( + self, + *, + copy_after: "CopyOption", + data_store: "DataStoreInfoBase", + **kwargs + ): + super(TargetCopySetting, self).__init__(**kwargs) + self.copy_after = copy_after + self.data_store = data_store + + +class TargetDetails(msrest.serialization.Model): + """Class encapsulating target details, used where the destination is not a datasource. + + All required parameters must be populated in order to send to Azure. + + :param file_prefix: Required. Restore operation may create multiple files inside location + pointed by Url + Below will be the common prefix for all of them. + :type file_prefix: str + :param restore_target_location_type: Required. Denotes the target location where the data will + be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + Possible values include: "Invalid", "AzureBlobs", "AzureFiles". + :type restore_target_location_type: str or + ~data_protection_client.models.RestoreTargetLocationType + :param url: Required. Url denoting the restore destination. It can point to container / file + share etc. + :type url: str + """ + + _validation = { + 'file_prefix': {'required': True}, + 'restore_target_location_type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'file_prefix': {'key': 'filePrefix', 'type': 'str'}, + 'restore_target_location_type': {'key': 'restoreTargetLocationType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + file_prefix: str, + restore_target_location_type: Union[str, "RestoreTargetLocationType"], + url: str, + **kwargs + ): + super(TargetDetails, self).__init__(**kwargs) + self.file_prefix = file_prefix + self.restore_target_location_type = restore_target_location_type + self.url = url + + +class TriggerBackupRequest(msrest.serialization.Model): + """Trigger backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_rule_options: Required. Name for the Rule of the Policy which needs to be applied + for this backup. + :type backup_rule_options: ~data_protection_client.models.AdHocBackupRuleOptions + """ + + _validation = { + 'backup_rule_options': {'required': True}, + } + + _attribute_map = { + 'backup_rule_options': {'key': 'backupRuleOptions', 'type': 'AdHocBackupRuleOptions'}, + } + + def __init__( + self, + *, + backup_rule_options: "AdHocBackupRuleOptions", + **kwargs + ): + super(TriggerBackupRequest, self).__init__(**kwargs) + self.backup_rule_options = backup_rule_options + + +class UserFacingError(msrest.serialization.Model): + """Error object used by layers that have access to localized content, and propagate that to user. + + :param code: Unique code for this error. + :type code: str + :param details: Additional related Errors. + :type details: list[~data_protection_client.models.UserFacingError] + :param inner_error: Inner Error. + :type inner_error: ~data_protection_client.models.InnerError + :param is_retryable: Whether the operation will be retryable or not. + :type is_retryable: bool + :param is_user_error: Whether the operation is due to a user error or service error. + :type is_user_error: bool + :param properties: Any key value pairs that can be injected inside error object. + :type properties: dict[str, str] + :param message: + :type message: str + :param recommended_action: RecommendedAction � localized. + :type recommended_action: list[str] + :param target: Target of the error. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[UserFacingError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'is_retryable': {'key': 'isRetryable', 'type': 'bool'}, + 'is_user_error': {'key': 'isUserError', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommended_action': {'key': 'recommendedAction', 'type': '[str]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + details: Optional[List["UserFacingError"]] = None, + inner_error: Optional["InnerError"] = None, + is_retryable: Optional[bool] = None, + is_user_error: Optional[bool] = None, + properties: Optional[Dict[str, str]] = None, + message: Optional[str] = None, + recommended_action: Optional[List[str]] = None, + target: Optional[str] = None, + **kwargs + ): + super(UserFacingError, self).__init__(**kwargs) + self.code = code + self.details = details + self.inner_error = inner_error + self.is_retryable = is_retryable + self.is_user_error = is_user_error + self.properties = properties + self.message = message + self.recommended_action = recommended_action + self.target = target + + +class ValidateForBackupRequest(msrest.serialization.Model): + """Validate for backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_instance: Required. Backup Instance. + :type backup_instance: ~data_protection_client.models.BackupInstance + """ + + _validation = { + 'backup_instance': {'required': True}, + } + + _attribute_map = { + 'backup_instance': {'key': 'backupInstance', 'type': 'BackupInstance'}, + } + + def __init__( + self, + *, + backup_instance: "BackupInstance", + **kwargs + ): + super(ValidateForBackupRequest, self).__init__(**kwargs) + self.backup_instance = backup_instance + + +class ValidateRestoreRequestObject(msrest.serialization.Model): + """Validate restore request object. + + All required parameters must be populated in order to send to Azure. + + :param restore_request_object: Required. Gets or sets the restore request object. + :type restore_request_object: ~data_protection_client.models.AzureBackupRestoreRequest + """ + + _validation = { + 'restore_request_object': {'required': True}, + } + + _attribute_map = { + 'restore_request_object': {'key': 'restoreRequestObject', 'type': 'AzureBackupRestoreRequest'}, + } + + def __init__( + self, + *, + restore_request_object: "AzureBackupRestoreRequest", + **kwargs + ): + super(ValidateRestoreRequestObject, self).__init__(**kwargs) + self.restore_request_object = restore_request_object diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/__init__.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/__init__.py new file mode 100644 index 00000000000..22292270eb9 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/__init__.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._backup_vaults_operations import BackupVaultsOperations +from ._operation_result_operations import OperationResultOperations +from ._operation_status_operations import OperationStatusOperations +from ._backup_vault_operation_results_operations import BackupVaultOperationResultsOperations +from ._data_protection_operations import DataProtectionOperations +from ._data_protection_operations_operations import DataProtectionOperationsOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._backup_instances_operations import BackupInstancesOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._jobs_operations import JobsOperations +from ._restorable_time_ranges_operations import RestorableTimeRangesOperations +from ._export_jobs_operations import ExportJobsOperations +from ._export_jobs_operation_result_operations import ExportJobsOperationResultOperations + +__all__ = [ + 'BackupVaultsOperations', + 'OperationResultOperations', + 'OperationStatusOperations', + 'BackupVaultOperationResultsOperations', + 'DataProtectionOperations', + 'DataProtectionOperationsOperations', + 'BackupPoliciesOperations', + 'BackupInstancesOperations', + 'RecoveryPointsOperations', + 'JobsOperations', + 'RestorableTimeRangesOperations', + 'ExportJobsOperations', + 'ExportJobsOperationResultOperations', +] diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_instances_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_instances_operations.py new file mode 100644 index 00000000000..57df34b27e0 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_instances_operations.py @@ -0,0 +1,1136 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupInstancesOperations(object): + """BackupInstancesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.BackupInstanceResourceList"] + """Gets a backup instances belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupInstanceResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.BackupInstanceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupInstanceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.BackupInstanceResource" + """Gets a backup instance with name in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupInstanceResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupInstanceResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + def _create_or_update_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.BackupInstanceResource" + **kwargs # type: Any + ): + # type: (...) -> "models.BackupInstanceResource" + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupInstanceResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + def begin_create_or_update( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.BackupInstanceResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.BackupInstanceResource"] + """Create or update a backup instance in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BackupInstanceResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInstanceResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.BackupInstanceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupInstanceResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + def _delete_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + def begin_delete( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a backup instance in a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore + + def _adhoc_backup_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.TriggerBackupRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._adhoc_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TriggerBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _adhoc_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore + + def begin_adhoc_backup( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.TriggerBackupRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationJobExtendedInfo"] + """Trigger adhoc backup. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.TriggerBackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._adhoc_backup_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_adhoc_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore + + def _validate_for_backup_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.ValidateForBackupRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_for_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateForBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _validate_for_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore + + def begin_validate_for_backup( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.ValidateForBackupRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationJobExtendedInfo"] + """Validate whether adhoc backup will be successful or not. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.ValidateForBackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._validate_for_backup_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore + + def _trigger_rehydrate_initial( + self, + resource_group_name, # type: str + vault_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.AzureBackupRehydrationRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._trigger_rehydrate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRehydrationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_rehydrate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore + + def begin_trigger_rehydrate( + self, + resource_group_name, # type: str + vault_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.AzureBackupRehydrationRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """rehydrate recovery point for restore for a BackupInstance. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param backup_instance_name: + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupRehydrationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._trigger_rehydrate_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_rehydrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore + + def _trigger_restore_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.AzureBackupRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._trigger_restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _trigger_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + def begin_trigger_restore( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.AzureBackupRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationJobExtendedInfo"] + """Triggers restore for a BackupInstance. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._trigger_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + def _validate_for_restore_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.ValidateRestoreRequestObject" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_for_restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateRestoreRequestObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _validate_for_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore + + def begin_validate_for_restore( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "models.ValidateRestoreRequestObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.OperationJobExtendedInfo"] + """Validates if Restore can be triggered for a DataSource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.ValidateRestoreRequestObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._validate_for_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py new file mode 100644 index 00000000000..a4a9148987e --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py @@ -0,0 +1,321 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupPoliciesOperations(object): + """BackupPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.BaseBackupPolicyResourceList"] + """Returns list of backup policies belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BaseBackupPolicyResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.BaseBackupPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BaseBackupPolicyResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.BaseBackupPolicyResource" + """Gets a backup policy belonging to a backup vault. + + Gets a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + def create_or_update( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + parameters, # type: "models.BaseBackupPolicyResource" + **kwargs # type: Any + ): + # type: (...) -> "models.BaseBackupPolicyResource" + """Creates or Updates a backup policy belonging to a backup vault. + + Creates or Updates a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BaseBackupPolicyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BaseBackupPolicyResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + def delete( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a backup policy belonging to a backup vault. + + Deletes a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Backup policy name. + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vault_operation_results_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vault_operation_results_operations.py new file mode 100644 index 00000000000..5b806e996b3 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vault_operation_results_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultOperationResultsOperations(object): + """BackupVaultOperationResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.BackupVaultResource" + """get. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vaults_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vaults_operations.py new file mode 100644 index 00000000000..01507ba2934 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_vaults_operations.py @@ -0,0 +1,629 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultsOperations(object): + """BackupVaultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_in_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.BackupVaultResourceList"] + """Returns resource collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get_in_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.BackupVaultResourceList"] + """Returns resource collection belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.BackupVaultResource" + """Returns a resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~data_protection_client.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def _create_or_update_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.BackupVaultResource" + **kwargs # type: Any + ): + # type: (...) -> "models.BackupVaultResource" + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupVaultResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def begin_create_or_update( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.BackupVaultResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.BackupVaultResource"] + """Creates or updates a BackupVault resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.BackupVaultResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def delete( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a BackupVault resource from the resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def _update_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.PatchResourceRequestInput" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.BackupVaultResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def begin_update( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "models.PatchResourceRequestInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.BackupVaultResource"] + """Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + resource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~data_protection_client.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def check_name_availability( + self, + resource_group_name, # type: str + location, # type: str + parameters, # type: "models.CheckNameAvailabilityRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.CheckNameAvailabilityResult" + """API to check for resource name availability. + + API to check for resource name availability. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param location: The location in which uniqueness will be verified. + :type location: str + :param parameters: Check name availability request. + :type parameters: ~data_protection_client.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~data_protection_client.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations.py new file mode 100644 index 00000000000..bf5feb06447 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperations(object): + """DataProtectionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check_feature_support( + self, + location, # type: str + parameters, # type: "models.FeatureValidationRequestBase" + **kwargs # type: Any + ): + # type: (...) -> "models.FeatureValidationResponseBase" + """Validates if a feature is supported. + + Validates if a feature is supported. + + :param location: + :type location: str + :param parameters: Feature support request object. + :type parameters: ~data_protection_client.models.FeatureValidationRequestBase + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FeatureValidationResponseBase, or the result of cls(response) + :rtype: ~data_protection_client.models.FeatureValidationResponseBase + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FeatureValidationResponseBase"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_feature_support.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'FeatureValidationRequestBase') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FeatureValidationResponseBase', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_feature_support.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations_operations.py new file mode 100644 index 00000000000..694b9fcd9df --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_data_protection_operations_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperationsOperations(object): + """DataProtectionOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ClientDiscoveryResponse"] + """Returns the list of available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataProtection/operations'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operation_result_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operation_result_operations.py new file mode 100644 index 00000000000..eab3c8f6e02 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operation_result_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperationResultOperations(object): + """ExportJobsOperationResultOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.ExportJobsResult"] + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also contains URL of a Blob and a SAS key to access the same. The blob + contains exported jobs in JSON serialized format. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param operation_id: OperationID which represents the export job. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportJobsResult, or the result of cls(response) + :rtype: ~data_protection_client.models.ExportJobsResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ExportJobsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExportJobsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operations.py new file mode 100644 index 00000000000..32f99771a28 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_export_jobs_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperations(object): + """ExportJobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _trigger_initial( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._trigger_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore + + def begin_trigger( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Triggers export of jobs and returns an OperationID to track. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._trigger_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_jobs_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_jobs_operations.py new file mode 100644 index 00000000000..18d5922e734 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_jobs_operations.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.AzureBackupJobResourceList"] + """Returns list of jobs belonging to a backup vault. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureBackupJobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.AzureBackupJobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupJobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AzureBackupJobResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + job_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.AzureBackupJobResource" + """Gets a job with id in a backup vault. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param job_id: The Job ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type job_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupJobResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupJobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupJobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupJobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_result_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_result_operations.py new file mode 100644 index 00000000000..39d01bc5a1f --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_result_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultOperations(object): + """OperationResultOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + operation_id, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.OperationJobExtendedInfo"] + """Gets the operation status for a resource. + + Gets the operation result for a resource. + + :param operation_id: + :type operation_id: str + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationJobExtendedInfo, or the result of cls(response) + :rtype: ~data_protection_client.models.OperationJobExtendedInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_status_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_status_operations.py new file mode 100644 index 00000000000..ae6dfc30af6 --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_operation_status_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationStatusOperations(object): + """OperationStatusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResource" + """Gets the operation status for a resource. + + Gets the operation status for a resource. + + :param location: + :type location: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationResource, or the result of cls(response) + :rtype: ~data_protection_client.models.OperationResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_recovery_points_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_recovery_points_operations.py new file mode 100644 index 00000000000..80b1e8794bd --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_recovery_points_operations.py @@ -0,0 +1,202 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RecoveryPointsOperations(object): + """RecoveryPointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.AzureBackupRecoveryPointResourceList"] + """Returns a list of Recovery Points for a DataSource in a vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureBackupRecoveryPointResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~data_protection_client.models.AzureBackupRecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupRecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AzureBackupRecoveryPointResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.AzureBackupRecoveryPointResource" + """Gets a Recovery Point using recoveryPointId for a Datasource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param recovery_point_id: Recovery point id. + :type recovery_point_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupRecoveryPointResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupRecoveryPointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupRecoveryPointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + 'recoveryPointId': self._serialize.url("recovery_point_id", recovery_point_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupRecoveryPointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_restorable_time_ranges_operations.py b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_restorable_time_ranges_operations.py new file mode 100644 index 00000000000..c311254501b --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_restorable_time_ranges_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6375, generator: {generator}) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RestorableTimeRangesOperations(object): + """RestorableTimeRangesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_protection_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def find( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instances, # type: str + parameters, # type: "models.AzureBackupFindRestorableTimeRangesRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.AzureBackupFindRestorableTimeRangesResponseResource" + """find. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instances: Backup instance name. + :type backup_instances: str + :param parameters: Request body for operation. + :type parameters: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupFindRestorableTimeRangesResponseResource, or the result of cls(response) + :rtype: ~data_protection_client.models.AzureBackupFindRestorableTimeRangesResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBackupFindRestorableTimeRangesResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.find.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstances': self._serialize.url("backup_instances", backup_instances, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupFindRestorableTimeRangesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupFindRestorableTimeRangesResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + find.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstances}/findRestorableTimeRanges'} # type: ignore diff --git a/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/py.typed b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/dataprotection/setup.cfg b/src/dataprotection/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/dataprotection/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/dataprotection/setup.py b/src/dataprotection/setup.py new file mode 100644 index 00000000000..69def2f5fda --- /dev/null +++ b/src/dataprotection/setup.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages + +# HISTORY.rst entry. +VERSION = '0.1.0' +try: + from azext_dataprotection.manual.version import VERSION +except ImportError: + pass + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = ["azure-mgmt-resourcegraph"] + +try: + from azext_dataprotection.manual.dependency import DEPENDENCIES +except ImportError: + pass + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='dataprotection', + version=VERSION, + description='Microsoft Azure Command-Line Tools DataProtectionClient Extension', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/dataprotection', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_dataprotection': ['azext_metadata.json']}, +) diff --git a/src/service_name.json b/src/service_name.json index eed6e237ff8..5d2ba7a2105 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -413,5 +413,10 @@ "Command": "az connectedvmware", "AzureServiceName": "Azure Arc for VMware PrivateCloud", "URL": "" + }, + { + "Command": "az dataprotection", + "AzureServiceName": "Azure Data Protection", + "URL": "" } ] From 9f0aa09e7652ee73b4d75fab064711e78fb99ab8 Mon Sep 17 00:00:00 2001 From: aegal Date: Wed, 9 Jun 2021 18:44:04 -0700 Subject: [PATCH 13/37] add dnc rp cli commands (#3433) * add initial dnc files * manual change to preparer to include location * update to fix tests * update to put tests under manual folder * address feedback * add header to file * add dnc to service_name.json * address feedback * updating to ddress comments Co-authored-by: Ali Egal --- .github/CODEOWNERS | 2 + src/dnc/HISTORY.rst | 8 + src/dnc/README.md | 83 ++ src/dnc/azext_dnc/__init__.py | 50 + src/dnc/azext_dnc/action.py | 17 + src/dnc/azext_dnc/azext_metadata.json | 4 + src/dnc/azext_dnc/custom.py | 17 + src/dnc/azext_dnc/generated/__init__.py | 12 + .../azext_dnc/generated/_client_factory.py | 32 + src/dnc/azext_dnc/generated/_help.py | 203 ++++ src/dnc/azext_dnc/generated/_params.py | 118 +++ src/dnc/azext_dnc/generated/_validators.py | 9 + src/dnc/azext_dnc/generated/action.py | 10 + src/dnc/azext_dnc/generated/commands.py | 64 ++ src/dnc/azext_dnc/generated/custom.py | 160 +++ src/dnc/azext_dnc/manual/__init__.py | 12 + src/dnc/azext_dnc/manual/tests/__init__.py | 9 + .../azext_dnc/manual/tests/latest/__init__.py | 12 + .../manual/tests/latest/example_steps.py | 179 ++++ .../manual/tests/latest/preparers.py | 113 +++ .../latest/recordings/test_dnc_Scenario.yaml | 300 ++++++ .../manual/tests/latest/test_dnc_scenario.py | 77 ++ src/dnc/azext_dnc/tests/__init__.py | 116 +++ src/dnc/azext_dnc/tests/latest/__init__.py | 12 + .../azext_dnc/tests/latest/example_steps.py | 188 ++++ src/dnc/azext_dnc/tests/latest/preparers.py | 159 +++ .../latest/recordings/test_dnc_Scenario.yaml | 159 +++ .../tests/latest/test_dnc_scenario.py | 97 ++ src/dnc/azext_dnc/vendored_sdks/__init__.py | 12 + .../azext_dnc/vendored_sdks/dnc/__init__.py | 19 + .../vendored_sdks/dnc/_configuration.py | 71 ++ src/dnc/azext_dnc/vendored_sdks/dnc/_dnc.py | 90 ++ .../azext_dnc/vendored_sdks/dnc/_version.py | 9 + .../vendored_sdks/dnc/aio/__init__.py | 10 + .../vendored_sdks/dnc/aio/_configuration.py | 67 ++ .../azext_dnc/vendored_sdks/dnc/aio/_dnc.py | 84 ++ .../dnc/aio/operations/__init__.py | 21 + .../aio/operations/_controller_operations.py | 411 ++++++++ .../_delegated_network_operations.py | 180 ++++ .../_delegated_subnet_service_operations.py | 615 ++++++++++++ .../dnc/aio/operations/_operations.py | 105 ++ ...rchestrator_instance_service_operations.py | 557 +++++++++++ .../vendored_sdks/dnc/models/__init__.py | 99 ++ .../vendored_sdks/dnc/models/_dnc_enums.py | 83 ++ .../vendored_sdks/dnc/models/_models.py | 855 ++++++++++++++++ .../vendored_sdks/dnc/models/_models_py3.py | 913 ++++++++++++++++++ .../vendored_sdks/dnc/operations/__init__.py | 21 + .../dnc/operations/_controller_operations.py | 421 ++++++++ .../_delegated_network_operations.py | 186 ++++ .../_delegated_subnet_service_operations.py | 628 ++++++++++++ .../dnc/operations/_operations.py | 110 +++ ...rchestrator_instance_service_operations.py | 569 +++++++++++ src/dnc/azext_dnc/vendored_sdks/dnc/py.typed | 1 + src/dnc/report.md | 247 +++++ src/dnc/setup.cfg | 1 + src/dnc/setup.py | 58 ++ src/service_name.json | 5 + 57 files changed, 8670 insertions(+) create mode 100644 src/dnc/HISTORY.rst create mode 100644 src/dnc/README.md create mode 100644 src/dnc/azext_dnc/__init__.py create mode 100644 src/dnc/azext_dnc/action.py create mode 100644 src/dnc/azext_dnc/azext_metadata.json create mode 100644 src/dnc/azext_dnc/custom.py create mode 100644 src/dnc/azext_dnc/generated/__init__.py create mode 100644 src/dnc/azext_dnc/generated/_client_factory.py create mode 100644 src/dnc/azext_dnc/generated/_help.py create mode 100644 src/dnc/azext_dnc/generated/_params.py create mode 100644 src/dnc/azext_dnc/generated/_validators.py create mode 100644 src/dnc/azext_dnc/generated/action.py create mode 100644 src/dnc/azext_dnc/generated/commands.py create mode 100644 src/dnc/azext_dnc/generated/custom.py create mode 100644 src/dnc/azext_dnc/manual/__init__.py create mode 100644 src/dnc/azext_dnc/manual/tests/__init__.py create mode 100644 src/dnc/azext_dnc/manual/tests/latest/__init__.py create mode 100644 src/dnc/azext_dnc/manual/tests/latest/example_steps.py create mode 100644 src/dnc/azext_dnc/manual/tests/latest/preparers.py create mode 100644 src/dnc/azext_dnc/manual/tests/latest/recordings/test_dnc_Scenario.yaml create mode 100644 src/dnc/azext_dnc/manual/tests/latest/test_dnc_scenario.py create mode 100644 src/dnc/azext_dnc/tests/__init__.py create mode 100644 src/dnc/azext_dnc/tests/latest/__init__.py create mode 100644 src/dnc/azext_dnc/tests/latest/example_steps.py create mode 100644 src/dnc/azext_dnc/tests/latest/preparers.py create mode 100644 src/dnc/azext_dnc/tests/latest/recordings/test_dnc_Scenario.yaml create mode 100644 src/dnc/azext_dnc/tests/latest/test_dnc_scenario.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/_configuration.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/_dnc.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/_version.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/_configuration.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/_dnc.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_controller_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_network_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_subnet_service_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_orchestrator_instance_service_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/models/_dnc_enums.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/__init__.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/_controller_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_network_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_subnet_service_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/operations/_orchestrator_instance_service_operations.py create mode 100644 src/dnc/azext_dnc/vendored_sdks/dnc/py.typed create mode 100644 src/dnc/report.md create mode 100644 src/dnc/setup.cfg create mode 100644 src/dnc/setup.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f47030d07e..d8917604c31 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,6 +28,8 @@ /src/dms-preview/ @temandr +/src/dnc/ @alegal + /src/express-route-cross-connection/ @kairu-ms @msyyc /src/application-insights/ @alexeldeib diff --git a/src/dnc/HISTORY.rst b/src/dnc/HISTORY.rst new file mode 100644 index 00000000000..1c139576ba0 --- /dev/null +++ b/src/dnc/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. diff --git a/src/dnc/README.md b/src/dnc/README.md new file mode 100644 index 00000000000..08a00042843 --- /dev/null +++ b/src/dnc/README.md @@ -0,0 +1,83 @@ +# Azure CLI dnc Extension # +This is the extension for dnc + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name dnc +``` + +### Included Features ### +#### dnc controller #### +##### Create ##### +``` +az dnc controller create --location "eastus2euap" --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Patch ##### +``` +az dnc controller patch --tags key="value" --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Show-detail ##### +``` +az dnc controller show-detail --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Delete ##### +``` +az dnc controller delete --resource-group "TestRG" --resource-name "testcontroller" +``` +#### dnc delegated-network #### +##### List ##### +``` +az dnc delegated-network list --resource-group "testRG" +``` +#### dnc orchestrator-instance-service #### +##### Create ##### +``` +az dnc orchestrator-instance-service create --type "SystemAssigned" --location "eastus2euap" \ + --api-server-endpoint "https://testk8s.cloudapp.net" --cluster-root-ca "ddsadsad344mfdsfdl" \ + --id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller" \ + --orchestrator-app-id "546192d7-503f-477a-9cfe-4efc3ee2b6e1" \ + --orchestrator-tenant-id "da6192d7-503f-477a-9cfe-4efc3ee2b6c3" \ + --private-link-resource-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1" \ + --resource-group "TestRG" --resource-name "testk8s1" +``` +##### List ##### +``` +az dnc orchestrator-instance-service list --resource-group "testRG" +``` +##### Patch ##### +``` +az dnc orchestrator-instance-service patch --tags key="value" --resource-group "TestRG" --resource-name "testk8s1" +``` +##### Show-detail ##### +``` +az dnc orchestrator-instance-service show-detail --resource-group "TestRG" --resource-name "testk8s1" +``` +##### Delete ##### +``` +az dnc orchestrator-instance-service delete --resource-group "TestRG" --resource-name "k8stest1" +``` +#### dnc delegated-subnet-service #### +##### Put-detail ##### +``` +az dnc delegated-subnet-service put-detail --location "eastus2euap" \ + --id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller" \ + --subnet-details-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" \ + --resource-group "TestRG" --resource-name "delegated1" +``` +##### Patch-detail ##### +``` +az dnc delegated-subnet-service patch-detail --tags key="value" --resource-group "TestRG" --resource-name "delegated1" +``` +##### List ##### +``` +az dnc delegated-subnet-service list --resource-group "testRG" +``` +##### Show-detail ##### +``` +az dnc delegated-subnet-service show-detail --resource-group "TestRG" --resource-name "delegated1" +``` +##### Delete ##### +``` +az dnc delegated-subnet-service delete --resource-group "TestRG" --resource-name "delegated1" +``` \ No newline at end of file diff --git a/src/dnc/azext_dnc/__init__.py b/src/dnc/azext_dnc/__init__.py new file mode 100644 index 00000000000..258f2269109 --- /dev/null +++ b/src/dnc/azext_dnc/__init__.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_dnc.generated._help import helps # pylint: disable=unused-import +try: + from azext_dnc.manual._help import helps # pylint: disable=reimported +except ImportError: + pass + + +class DNCCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_dnc.generated._client_factory import cf_dnc_cl + dnc_custom = CliCommandType( + operations_tmpl='azext_dnc.custom#{}', + client_factory=cf_dnc_cl) + parent = super(DNCCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=dnc_custom) + + def load_command_table(self, args): + from azext_dnc.generated.commands import load_command_table + load_command_table(self, args) + try: + from azext_dnc.manual.commands import load_command_table as load_command_table_manual + load_command_table_manual(self, args) + except ImportError: + pass + return self.command_table + + def load_arguments(self, command): + from azext_dnc.generated._params import load_arguments + load_arguments(self, command) + try: + from azext_dnc.manual._params import load_arguments as load_arguments_manual + load_arguments_manual(self, command) + except ImportError: + pass + + +COMMAND_LOADER_CLS = DNCCommandsLoader diff --git a/src/dnc/azext_dnc/action.py b/src/dnc/azext_dnc/action.py new file mode 100644 index 00000000000..d95d53bf711 --- /dev/null +++ b/src/dnc/azext_dnc/action.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.action import * # noqa: F403 +try: + from .manual.action import * # noqa: F403 +except ImportError: + pass diff --git a/src/dnc/azext_dnc/azext_metadata.json b/src/dnc/azext_dnc/azext_metadata.json new file mode 100644 index 00000000000..cfc30c747c7 --- /dev/null +++ b/src/dnc/azext_dnc/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0" +} \ No newline at end of file diff --git a/src/dnc/azext_dnc/custom.py b/src/dnc/azext_dnc/custom.py new file mode 100644 index 00000000000..dbe9d5f9742 --- /dev/null +++ b/src/dnc/azext_dnc/custom.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.custom import * # noqa: F403 +try: + from .manual.custom import * # noqa: F403 +except ImportError: + pass diff --git a/src/dnc/azext_dnc/generated/__init__.py b/src/dnc/azext_dnc/generated/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dnc/azext_dnc/generated/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dnc/azext_dnc/generated/_client_factory.py b/src/dnc/azext_dnc/generated/_client_factory.py new file mode 100644 index 00000000000..c98e77db8cf --- /dev/null +++ b/src/dnc/azext_dnc/generated/_client_factory.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +def cf_dnc_cl(cli_ctx, *_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azext_dnc.vendored_sdks.dnc import DNC + return get_mgmt_service_client(cli_ctx, + DNC) + + +def cf_controller(cli_ctx, *_): + return cf_dnc_cl(cli_ctx).controller + + +def cf_delegated_network(cli_ctx, *_): + return cf_dnc_cl(cli_ctx).delegated_network + + +def cf_orchestrator_instance_service(cli_ctx, *_): + return cf_dnc_cl(cli_ctx).orchestrator_instance_service + + +def cf_delegated_subnet_service(cli_ctx, *_): + return cf_dnc_cl(cli_ctx).delegated_subnet_service diff --git a/src/dnc/azext_dnc/generated/_help.py b/src/dnc/azext_dnc/generated/_help.py new file mode 100644 index 00000000000..17e76151876 --- /dev/null +++ b/src/dnc/azext_dnc/generated/_help.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.help_files import helps + + +helps['dnc controller'] = """ + type: group + short-summary: Manage controller with dnc +""" + +helps['dnc controller show'] = """ + type: command + short-summary: "Gets details about the specified dnc controller." + examples: + - name: Get details of a controller + text: |- + az dnc controller show --resource-group "TestRG" --resource-name "testcontroller" +""" + +helps['dnc controller create'] = """ + type: command + short-summary: "Create a dnc controller." + examples: + - name: Create controller + text: |- + az dnc controller create --location "West US" --resource-group "TestRG" --resource-name \ +"testcontroller" +""" + +helps['dnc controller delete'] = """ + type: command + short-summary: "Deletes the DNC controller." + examples: + - name: Delete controller + text: |- + az dnc controller delete --resource-group "TestRG" --resource-name "testcontroller" +""" + +helps['dnc controller wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the dnc controller is met. + examples: + - name: Pause executing next line of CLI script until the dnc controller is successfully created. + text: |- + az dnc controller wait --resource-group "TestRG" --resource-name "testcontroller" --created + - name: Pause executing next line of CLI script until the dnc controller is successfully deleted. + text: |- + az dnc controller wait --resource-group "TestRG" --resource-name "testcontroller" --deleted +""" + +helps['dnc delegated-network'] = """ + type: group + short-summary: Manage delegated network with dnc +""" + +helps['dnc delegated-network list'] = """ + type: command + short-summary: "Get all the delegatedController resources in a resource group. And Get all the delegatedController \ +resources in a subscription." + examples: + - name: Get DelegatedNetwork resources by resource group + text: |- + az dnc delegated-network list --resource-group "testRG" + - name: Get DelegatedController resources by subscription + text: |- + az dnc delegated-network list +""" + +helps['dnc orchestrator-instance-service'] = """ + type: group + short-summary: Manage orchestrator instance service with dnc +""" + +helps['dnc orchestrator-instance-service list'] = """ + type: command + short-summary: "Get all the OrchestratorInstances resources in a resource group. And Get all the \ +orchestratorInstance resources in a subscription." + examples: + - name: Get OrchestratorInstance resources by resource group + text: |- + az dnc orchestrator-instance-service list --resource-group "testRG" + - name: Get orchestratorInstance resources by subscription + text: |- + az dnc orchestrator-instance-service list +""" + +helps['dnc orchestrator-instance-service show'] = """ + type: command + short-summary: "Gets details about the orchestrator instance." + examples: + - name: Get details of a orchestratorInstance + text: |- + az dnc orchestrator-instance-service show --resource-group "TestRG" --resource-name "testk8s1" +""" + +helps['dnc orchestrator-instance-service create'] = """ + type: command + short-summary: "Create a orchestrator instance." + examples: + - name: Create orchestrator instance + text: |- + az dnc orchestrator-instance-service create --type "SystemAssigned" --location "West US" \ +--api-server-endpoint "https://testk8s.cloudapp.net" --cluster-root-ca "ddsadsad344mfdsfdl" --id \ +"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/control\ +ler/testcontroller" --orchestrator-app-id "546192d7-503f-477a-9cfe-4efc3ee2b6e1" --orchestrator-tenant-id \ +"da6192d7-503f-477a-9cfe-4efc3ee2b6c3" --priv-link-resource-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/res\ +ourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1" --resource-group "TestRG" \ +--resource-name "testk8s1" +""" + +helps['dnc orchestrator-instance-service delete'] = """ + type: command + short-summary: "Deletes the Orchestrator Instance." + examples: + - name: Delete Orchestrator Instance + text: |- + az dnc orchestrator-instance-service delete --resource-group "TestRG" --resource-name "k8stest1" +""" + +helps['dnc orchestrator-instance-service wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the dnc orchestrator-instance-service is met. + examples: + - name: Pause executing next line of CLI script until the dnc orchestrator-instance-service is successfully \ +created. + text: |- + az dnc orchestrator-instance-service wait --resource-group "TestRG" --resource-name "testk8s1" \ +--created + - name: Pause executing next line of CLI script until the dnc orchestrator-instance-service is successfully \ +deleted. + text: |- + az dnc orchestrator-instance-service wait --resource-group "TestRG" --resource-name "testk8s1" \ +--deleted +""" + +helps['dnc delegated-subnet-service'] = """ + type: group + short-summary: Manage delegated subnet service with dnc +""" + +helps['dnc delegated-subnet-service list'] = """ + type: command + short-summary: "Get all the DelegatedSubnets resources in a resource group. And Get all the DelegatedSubnets \ +resources in a subscription." + examples: + - name: Get DelegatedSubnets resources by resource group + text: |- + az dnc delegated-subnet-service list --resource-group "testRG" + - name: Get DelegatedSubnets resources by subscription + text: |- + az dnc delegated-subnet-service list +""" + +helps['dnc delegated-subnet-service show'] = """ + type: command + short-summary: "Gets details about the specified dnc DelegatedSubnet Link." + examples: + - name: Get details of a delegated subnet + text: |- + az dnc delegated-subnet-service show --resource-group "TestRG" --resource-name "delegated1" +""" + +helps['dnc delegated-subnet-service create'] = """ + type: command + short-summary: "Put delegated subnet resource." + examples: + - name: put delegated subnet + text: |- + az dnc delegated-subnet-service create --location "West US" --id "/subscriptions/613192d7-503f-477a-9cfe\ +-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller" \ +--subnet-details-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Netw\ +ork/virtualNetworks/testvnet/subnets/testsubnet" --resource-group "TestRG" --resource-name "delegated1" +""" + +helps['dnc delegated-subnet-service delete'] = """ + type: command + short-summary: "Delete dnc DelegatedSubnet." + examples: + - name: delete delegated subnet + text: |- + az dnc delegated-subnet-service delete --resource-group "TestRG" --resource-name "delegated1" +""" + +helps['dnc delegated-subnet-service wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the dnc delegated-subnet-service is met. + examples: + - name: Pause executing next line of CLI script until the dnc delegated-subnet-service is successfully created. + text: |- + az dnc delegated-subnet-service wait --resource-group "TestRG" --resource-name "delegated1" --created + - name: Pause executing next line of CLI script until the dnc delegated-subnet-service is successfully deleted. + text: |- + az dnc delegated-subnet-service wait --resource-group "TestRG" --resource-name "delegated1" --deleted +""" diff --git a/src/dnc/azext_dnc/generated/_params.py b/src/dnc/azext_dnc/generated/_params.py new file mode 100644 index 00000000000..2175ea831a5 --- /dev/null +++ b/src/dnc/azext_dnc/generated/_params.py @@ -0,0 +1,118 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + tags_type, + get_three_state_flag, + get_enum_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import get_default_location_from_resource_group + + +def load_arguments(self, _): + + with self.argument_context('dnc controller show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc controller create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + + with self.argument_context('dnc controller delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc controller wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc delegated-network list') as c: + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dnc orchestrator-instance-service list') as c: + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dnc orchestrator-instance-service show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc orchestrator-instance-service create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('type_', options_list=['--type'], arg_type=get_enum_type(['SystemAssigned', 'None']), help='The ' + 'type of identity used for orchestrator cluster. Type \'SystemAssigned\' will use an implicitly ' + 'created identity orchestrator clusters', arg_group='Identity') + c.argument('orchestrator_app_id', type=str, help='AAD ID used with apiserver') + c.argument('orchestrator_tenant_id', type=str, help='TenantID of server App ID') + c.argument('cluster_root_ca', type=str, help='RootCA certificate of kubernetes cluster base64 encoded') + c.argument('api_server_endpoint', type=str, help='K8s APIServer url. Either one of apiServerEndpoint or ' + 'privateLinkResourceId can be specified') + c.argument('private_link_resource_id', options_list=['--priv-link-resource-id'], type=str, help='private link ' + 'arm resource id. Either one of apiServerEndpoint or privateLinkResourceId can be specified') + c.argument('id_', options_list=['--id'], type=str, help='controller arm resource id', arg_group='Controller ' + 'Details') + + with self.argument_context('dnc orchestrator-instance-service delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + c.argument('force_delete', arg_type=get_three_state_flag(), help='Force delete resource') + + with self.argument_context('dnc orchestrator-instance-service wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc delegated-subnet-service list') as c: + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('dnc delegated-subnet-service show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + + with self.argument_context('dnc delegated-subnet-service create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('id_', options_list=['--id'], type=str, help='controller arm resource id', arg_group='Controller ' + 'Details') + c.argument('subnet_details_id', type=str, help='subnet arm resource id', arg_group='Subnet Details') + + with self.argument_context('dnc delegated-subnet-service delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') + c.argument('force_delete', arg_type=get_three_state_flag(), help='Force delete resource') + + with self.argument_context('dnc delegated-subnet-service wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, ' + 'and a maximum of 63.', id_part='name') diff --git a/src/dnc/azext_dnc/generated/_validators.py b/src/dnc/azext_dnc/generated/_validators.py new file mode 100644 index 00000000000..b33a44c1ebf --- /dev/null +++ b/src/dnc/azext_dnc/generated/_validators.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- diff --git a/src/dnc/azext_dnc/generated/action.py b/src/dnc/azext_dnc/generated/action.py new file mode 100644 index 00000000000..b49bfaeeefe --- /dev/null +++ b/src/dnc/azext_dnc/generated/action.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access diff --git a/src/dnc/azext_dnc/generated/commands.py b/src/dnc/azext_dnc/generated/commands.py new file mode 100644 index 00000000000..2784ab57041 --- /dev/null +++ b/src/dnc/azext_dnc/generated/commands.py @@ -0,0 +1,64 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + from azext_dnc.generated._client_factory import cf_controller + dnc_controller = CliCommandType( + operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._controller_operations#ControllerOperations.{}', + client_factory=cf_controller) + with self.command_group('dnc controller', dnc_controller, client_factory=cf_controller) as g: + g.custom_show_command('show', 'dnc_controller_show') + g.custom_command('create', 'dnc_controller_create', supports_no_wait=True) + g.custom_command('delete', 'dnc_controller_delete', supports_no_wait=True, confirmation=True) + g.custom_wait_command('wait', 'dnc_controller_show') + + from azext_dnc.generated._client_factory import cf_delegated_network + dnc_delegated_network = CliCommandType( + operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._delegated_network_operations#DelegatedNetworkOperation' + 's.{}', + client_factory=cf_delegated_network) + with self.command_group('dnc delegated-network', dnc_delegated_network, client_factory=cf_delegated_network) as g: + g.custom_command('list', 'dnc_delegated_network_list') + + from azext_dnc.generated._client_factory import cf_orchestrator_instance_service + dnc_orchestrator_instance_service = CliCommandType( + operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._orchestrator_instance_service_operations#OrchestratorI' + 'nstanceServiceOperations.{}', + client_factory=cf_orchestrator_instance_service) + with self.command_group('dnc orchestrator-instance-service', dnc_orchestrator_instance_service, + client_factory=cf_orchestrator_instance_service) as g: + g.custom_command('list', 'dnc_orchestrator_instance_service_list') + g.custom_show_command('show', 'dnc_orchestrator_instance_service_show') + g.custom_command('create', 'dnc_orchestrator_instance_service_create', supports_no_wait=True) + g.custom_command('delete', 'dnc_orchestrator_instance_service_delete', supports_no_wait=True, + confirmation=True) + g.custom_wait_command('wait', 'dnc_orchestrator_instance_service_show') + + from azext_dnc.generated._client_factory import cf_delegated_subnet_service + dnc_delegated_subnet_service = CliCommandType( + operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._delegated_subnet_service_operations#DelegatedSubnetSer' + 'viceOperations.{}', + client_factory=cf_delegated_subnet_service) + with self.command_group('dnc delegated-subnet-service', dnc_delegated_subnet_service, + client_factory=cf_delegated_subnet_service) as g: + g.custom_command('list', 'dnc_delegated_subnet_service_list') + g.custom_show_command('show', 'dnc_delegated_subnet_service_show') + g.custom_command('create', 'dnc_delegated_subnet_service_create', supports_no_wait=True) + g.custom_command('delete', 'dnc_delegated_subnet_service_delete', supports_no_wait=True, confirmation=True) + g.custom_wait_command('wait', 'dnc_delegated_subnet_service_show') + + with self.command_group('dnc', is_experimental=True): + pass diff --git a/src/dnc/azext_dnc/generated/custom.py b/src/dnc/azext_dnc/generated/custom.py new file mode 100644 index 00000000000..22adca920f2 --- /dev/null +++ b/src/dnc/azext_dnc/generated/custom.py @@ -0,0 +1,160 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from azure.cli.core.util import sdk_no_wait + + +def dnc_controller_show(client, + resource_group_name, + resource_name): + return client.get_details(resource_group_name=resource_group_name, + resource_name=resource_name) + + +def dnc_controller_create(client, + resource_group_name, + resource_name, + location=None, + tags=None, + no_wait=False): + parameters = {} + parameters['location'] = location + parameters['tags'] = tags + return sdk_no_wait(no_wait, + client.begin_create, + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters) + + +def dnc_controller_delete(client, + resource_group_name, + resource_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + resource_name=resource_name) + + +def dnc_delegated_network_list(client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def dnc_orchestrator_instance_service_list(client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def dnc_orchestrator_instance_service_show(client, + resource_group_name, + resource_name): + return client.get_details(resource_group_name=resource_group_name, + resource_name=resource_name) + + +def dnc_orchestrator_instance_service_create(client, + resource_group_name, + resource_name, + location=None, + tags=None, + type_=None, + orchestrator_app_id=None, + orchestrator_tenant_id=None, + cluster_root_ca=None, + api_server_endpoint=None, + private_link_resource_id=None, + id_=None, + no_wait=False): + parameters = {} + parameters['location'] = location + parameters['kind'] = "Kubernetes" + parameters['tags'] = tags + parameters['identity'] = {} + parameters['identity']['type'] = type_ + parameters['properties'] = {} + parameters['properties']['orchestrator_app_id'] = orchestrator_app_id + parameters['properties']['orchestrator_tenant_id'] = orchestrator_tenant_id + parameters['properties']['cluster_root_ca'] = cluster_root_ca + parameters['properties']['api_server_endpoint'] = api_server_endpoint + parameters['properties']['private_link_resource_id'] = private_link_resource_id + parameters['properties']['controller_details'] = {} + parameters['properties']['controller_details']['id'] = id_ + return sdk_no_wait(no_wait, + client.begin_create, + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters) + + +def dnc_orchestrator_instance_service_delete(client, + resource_group_name, + resource_name, + force_delete=None, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete) + + +def dnc_delegated_subnet_service_list(client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def dnc_delegated_subnet_service_show(client, + resource_group_name, + resource_name): + return client.get_details(resource_group_name=resource_group_name, + resource_name=resource_name) + + +def dnc_delegated_subnet_service_create(client, + resource_group_name, + resource_name, + location=None, + tags=None, + id_=None, + subnet_details_id=None, + no_wait=False): + parameters = {} + parameters['location'] = location + parameters['tags'] = tags + parameters['controller_details'] = {} + parameters['controller_details']['id'] = id_ + parameters['subnet_details'] = {} + parameters['subnet_details']['id'] = subnet_details_id + return sdk_no_wait(no_wait, + client.begin_put_details, + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters) + + +def dnc_delegated_subnet_service_delete(client, + resource_group_name, + resource_name, + force_delete=None, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete_details, + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete) diff --git a/src/dnc/azext_dnc/manual/__init__.py b/src/dnc/azext_dnc/manual/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dnc/azext_dnc/manual/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dnc/azext_dnc/manual/tests/__init__.py b/src/dnc/azext_dnc/manual/tests/__init__.py new file mode 100644 index 00000000000..b33a44c1ebf --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/__init__.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- diff --git a/src/dnc/azext_dnc/manual/tests/latest/__init__.py b/src/dnc/azext_dnc/manual/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dnc/azext_dnc/manual/tests/latest/example_steps.py b/src/dnc/azext_dnc/manual/tests/latest/example_steps.py new file mode 100644 index 00000000000..9d6b6ccf131 --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/latest/example_steps.py @@ -0,0 +1,179 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +# EXAMPLE: /Controller/put/Create controller +def step_controller_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller create ' + '--location "eastus2euap" ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /Controller/get/Get details of a controller +def step_controller_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller show ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/put/put delegated subnet +def step_delegated_subnet_service_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service create ' + '--location "eastus2euap" ' + '--id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DelegatedNetwork/controlle' + 'r/{myController}" ' + '--subnet-details-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Network/vir' + 'tualNetworks/{vn}/subnets/default" ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get details of a delegated subnet +def step_delegated_subnet_service_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service show ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/patch/patch delegated subnet +def step_delegated_subnet_service_patch_detail(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service patch-detail ' + '--tags key="value" ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/put/Create orchestrator instance +def step_orchestrator_instance_service_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service create ' + '--type "SystemAssigned" ' + '--location "eastus2euap" ' + '--api-server-endpoint "https://testk8s.cloudapp.net" ' + '--cluster-root-ca "ddsadsad344mfdsfdl" ' + '--id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DelegatedNetwork/controlle' + 'r/{myController}" ' + '--orchestrator-app-id "546192d7-503f-477a-9cfe-4efc3ee2b6e1" ' + '--orchestrator-tenant-id "da6192d7-503f-477a-9cfe-4efc3ee2b6c3" ' + '--priv-link-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Network' + '/privateLinkServices/plresource1" ' + '--resource-group "{rg}" ' + '--resource-name "testk8s1"', + checks=checks) + +# EXAMPLE: /OrchestratorInstanceService/get/Get details of a orchestratorInstance +def step_orchestrator_instance_service_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service show ' + '--resource-group "{rg}" ' + '--resource-name "testk8s1"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/get/Get OrchestratorInstance resources by resource group +def step_orchestrator_instance_service_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/get/Get orchestratorInstance resources by subscription +def step_orchestrator_instance_service_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/delete/Delete Orchestrator Instance +def step_orchestrator_instance_service_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service delete -y ' + '--resource-group "{rg}" ' + '--resource-name "k8stest1"', + checks=checks) + + +# EXAMPLE: /Controller/delete/Delete controller +def step_controller_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller delete -y ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /DelegatedNetwork/get/Get DelegatedController resources by subscription +def step_delegated_network_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-network list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /DelegatedNetwork/get/Get DelegatedNetwork resources by resource group +def step_delegated_network_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-network list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by resource group +def step_delegated_subnet_service_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by subscription +def step_delegated_subnet_service_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/delete/delete delegated subnet +def step_delegated_subnet_service_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service delete -y ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) \ No newline at end of file diff --git a/src/dnc/azext_dnc/manual/tests/latest/preparers.py b/src/dnc/azext_dnc/manual/tests/latest/preparers.py new file mode 100644 index 00000000000..7017422b05e --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/latest/preparers.py @@ -0,0 +1,113 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from datetime import datetime +from azure_devtools.scenario_tests import SingleValueReplacer +from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer +from azure.cli.testsdk.exceptions import CliTestError +from azure.cli.testsdk.reverse_dependency import get_dummy_cli + + +KEY_RESOURCE_GROUP = 'rg' +KEY_VIRTUAL_NETWORK = 'vnet' +KEY_VNET_SUBNET = 'subnet' +KEY_VNET_NIC = 'nic' + + +class VirtualNetworkPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='virtual_network', + resource_group_name=None, + resource_group_key=KEY_RESOURCE_GROUP, + dev_setting_name='AZURE_CLI_TEST_DEV_VIRTUAL_NETWORK_NAME', + random_name_length=24, key=KEY_VIRTUAL_NETWORK): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VirtualNetworkPreparer, self).__init__( + name_prefix, random_name_length) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group_name = resource_group_name + self.resource_group_key = resource_group_key + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group_name: + self.resource_group_name = self.test_class_instance.kwargs.get( + self.resource_group_key) + if not self.resource_group_name: + raise CliTestError("Error: No resource group configured!") + + tags = {'product': 'azurecli', 'cause': 'automation', + 'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')} + if 'ENV_JOB_NAME' in os.environ: + tags['job'] = os.environ['ENV_JOB_NAME'] + tags = ' '.join(['{}={}'.format(key, value) + for key, value in tags.items()]) + template = 'az network vnet create --resource-group {} --name {} --subnet-name default --tag ' + tags + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group_name, name)) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + # delete vnet if test is being recorded and if the vnet is not a dev rg + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) + + +class VnetSubnetPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + address_prefixes="11.0.0.0/24", + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_SUBNET_NAME', + key=KEY_VNET_SUBNET): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetSubnetPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.address_prefixes = address_prefixes + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + self.test_class_instance.kwargs[self.key] = 'default' + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + pass diff --git a/src/dnc/azext_dnc/manual/tests/latest/recordings/test_dnc_Scenario.yaml b/src/dnc/azext_dnc/manual/tests/latest/recordings/test_dnc_Scenario.yaml new file mode 100644 index 00000000000..b8702f66d3b --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/latest/recordings/test_dnc_Scenario.yaml @@ -0,0 +1,300 @@ +interactions: +- request: + body: '{"location": "eastus2euap"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc controller create + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/json + ParameterSetName: + - --location --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller?api-version=2021-03-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller","location":"eastus2euap","name":"testcontroller","type":"Microsoft.DelegatedNetwork/controller","properties":{"controllerProperties":{"dncAppId":"a91b1853-4403-4f54-b5cb-d1ea19d90c37","dncEndpoint":"https://openai-eastus2euap.dnc.azure.com","dncTenantId":null},"resourceGuid":"5c7e26be-7ff9-4aaf-9e16-0bc759605aea","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '562' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:13:53 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc controller show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller?api-version=2021-03-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller","location":"eastus2euap","name":"testcontroller","type":"Microsoft.DelegatedNetwork/controller","properties":{"controllerProperties":{"dncAppId":"a91b1853-4403-4f54-b5cb-d1ea19d90c37","dncEndpoint":"https://openai-eastus2euap.dnc.azure.com","dncTenantId":null},"resourceGuid":"5c7e26be-7ff9-4aaf-9e16-0bc759605aea","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '562' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:13:54 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + 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: '{"location": "eastus2euap", "kind": "Kubernetes", "identity": {"type": + "SystemAssigned"}, "properties": {"orchestratorAppId": "546192d7-503f-477a-9cfe-4efc3ee2b6e1", + "orchestratorTenantId": "da6192d7-503f-477a-9cfe-4efc3ee2b6c3", "clusterRootCA": + "ddsadsad344mfdsfdl", "apiServerEndpoint": "https://testk8s.cloudapp.net", "privateLinkResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateLinkServices/plresource1", + "controllerDetails": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc orchestrator-instance-service create + Connection: + - keep-alive + Content-Length: + - '791' + Content-Type: + - application/json + ParameterSetName: + - --type --location --api-server-endpoint --cluster-root-ca --id --orchestrator-app-id + --orchestrator-tenant-id --priv-link-resource-id --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/orchestrators/testk8s1?api-version=2021-03-15 + response: + body: + string: '{"kind":"Kubernetes","identity":{"principalId":"72c78660-546e-4019-a4d8-d60e4a6d966c","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/orchestratorInstances/testk8s1","location":"eastus2euap","name":"testk8s1","type":"Microsoft.DelegatedNetwork/orchestratorInstances","properties":{"orchestratorAppId":"546192d7-503f-477a-9cfe-4efc3ee2b6e1","orchestratorTenantId":"da6192d7-503f-477a-9cfe-4efc3ee2b6c3","clusterRootCA":"ddsadsad344mfdsfdl","apiServerEndpoint":"https://testk8s.cloudapp.net","controllerDetails":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller"},"resourceGuid":"27626930-d2e4-4acd-9ac8-6d8579a3b7c8","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1025' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:14:00 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc orchestrator-instance-service show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/orchestrators/testk8s1?api-version=2021-03-15 + response: + body: + string: '{"kind":"Kubernetes","identity":{"principalId":"72c78660-546e-4019-a4d8-d60e4a6d966c","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/orchestratorInstances/testk8s1","location":"eastus2euap","name":"testk8s1","type":"Microsoft.DelegatedNetwork/orchestratorInstances","properties":{"orchestratorAppId":"546192d7-503f-477a-9cfe-4efc3ee2b6e1","orchestratorTenantId":"da6192d7-503f-477a-9cfe-4efc3ee2b6c3","clusterRootCA":"ddsadsad344mfdsfdl","apiServerEndpoint":"https://testk8s.cloudapp.net","controllerDetails":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller"},"resourceGuid":"27626930-d2e4-4acd-9ac8-6d8579a3b7c8","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1025' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:14:02 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + 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: + - dnc orchestrator-instance-service delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/orchestrators/k8stest1?api-version=2021-03-15 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Wed, 09 Jun 2021 00:14:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc controller delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller?api-version=2021-03-15 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:14:05 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/dnc/azext_dnc/manual/tests/latest/test_dnc_scenario.py b/src/dnc/azext_dnc/manual/tests/latest/test_dnc_scenario.py new file mode 100644 index 00000000000..b7ea6e7dc42 --- /dev/null +++ b/src/dnc/azext_dnc/manual/tests/latest/test_dnc_scenario.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer +from .preparers import VirtualNetworkPreparer +from .example_steps import step_controller_create +from .example_steps import step_controller_show +from .example_steps import step_delegated_subnet_service_create +from .example_steps import step_delegated_subnet_service_list +from .example_steps import step_delegated_subnet_service_show +from .example_steps import step_orchestrator_instance_service_create +from .example_steps import step_orchestrator_instance_service_show +from .example_steps import step_orchestrator_instance_service_list +from .example_steps import step_orchestrator_instance_service_list2 +from .example_steps import step_orchestrator_instance_service_delete +from .example_steps import step_controller_delete +from .example_steps import step_delegated_network_list +from .example_steps import step_delegated_network_list2 +from .example_steps import step_delegated_subnet_service_list2 +from .example_steps import step_delegated_subnet_service_delete + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +# Env setup_scenario +def setup_scenario(test, rg, rg_2): + pass + + +# Env cleanup_scenario +def cleanup_scenario(test, rg, rg_2): + pass + + +# Testcase: Scenario +def call_scenario(test, rg, rg_2): + setup_scenario(test, rg, rg_2) + step_controller_create(test, rg, rg_2, checks=[]) + step_controller_show(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_create(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_show(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_delete(test, rg, rg_2, checks=[]) + step_controller_delete(test, rg, rg_2, checks=[]) + cleanup_scenario(test, rg, rg_2) + + +# Test class for Scenario +class DncScenarioTest(ScenarioTest): + + def __init__(self, *args, **kwargs): + super(DncScenarioTest, self).__init__(*args, **kwargs) + self.kwargs.update({ + 'subscription_id': self.get_subscription_id() + }) + + self.kwargs.update({ + 'myController': 'testcontroller', + 'myController2': 'dnctestcontroller', + }) + + + @ResourceGroupPreparer(name_prefix='clitestdnc_TestRG'[:7], key='rg', parameter_name='rg') + @ResourceGroupPreparer(name_prefix='clitestdnc_testRG'[:7], key='rg_2', parameter_name='rg_2') + @VirtualNetworkPreparer(name_prefix='clitestdnc_testvnet'[:7], key='vn', resource_group_key='rg') + def test_dnc_Scenario(self, rg, rg_2): + call_scenario(self, rg, rg_2) + diff --git a/src/dnc/azext_dnc/tests/__init__.py b/src/dnc/azext_dnc/tests/__init__.py new file mode 100644 index 00000000000..70488e93851 --- /dev/null +++ b/src/dnc/azext_dnc/tests/__init__.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +import inspect +import logging +import os +import sys +import traceback +import datetime as dt + +from azure.core.exceptions import AzureError +from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError + + +logger = logging.getLogger('azure.cli.testsdk') +logger.addHandler(logging.StreamHandler()) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) +exceptions = [] +test_map = dict() +SUCCESSED = "successed" +FAILED = "failed" + + +def try_manual(func): + def import_manual_function(origin_func): + from importlib import import_module + decorated_path = inspect.getfile(origin_func).lower() + module_path = __path__[0].lower() + if not decorated_path.startswith(module_path): + raise Exception("Decorator can only be used in submodules!") + manual_path = os.path.join( + decorated_path[module_path.rfind(os.path.sep) + 1:]) + manual_file_path, manual_file_name = os.path.split(manual_path) + module_name, _ = os.path.splitext(manual_file_name) + manual_module = "..manual." + \ + ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) + return getattr(import_module(manual_module, package=__name__), origin_func.__name__) + + def get_func_to_call(): + func_to_call = func + try: + func_to_call = import_manual_function(func) + logger.info("Found manual override for %s(...)", func.__name__) + except (ImportError, AttributeError): + pass + return func_to_call + + def wrapper(*args, **kwargs): + func_to_call = get_func_to_call() + logger.info("running %s()...", func.__name__) + try: + test_map[func.__name__] = dict() + test_map[func.__name__]["result"] = SUCCESSED + test_map[func.__name__]["error_message"] = "" + test_map[func.__name__]["error_stack"] = "" + test_map[func.__name__]["error_normalized"] = "" + test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() + ret = func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, + JMESPathCheckAssertionError) as e: + use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE") + if use_exception_cache is None or use_exception_cache.lower() != "true": + raise + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + test_map[func.__name__]["result"] = FAILED + test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] + test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( + "\r\n", " ").replace("\n", " ")[:500] + logger.info("--------------------------------------") + logger.info("step exception: %s", e) + logger.error("--------------------------------------") + logger.error("step exception in %s: %s", func.__name__, e) + logger.info(traceback.format_exc()) + exceptions.append((func.__name__, sys.exc_info())) + else: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + return ret + + if inspect.isclass(func): + return get_func_to_call() + return wrapper + + +def calc_coverage(filename): + filename = filename.split(".")[0] + coverage_name = filename + "_coverage.md" + with open(coverage_name, "w") as f: + f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") + total = len(test_map) + covered = 0 + for k, v in test_map.items(): + if not k.startswith("step_"): + total -= 1 + continue + if v["result"] == SUCCESSED: + covered += 1 + f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" + "{end_dt}|\n".format(step_name=k, **v)) + f.write("Coverage: {}/{}\n".format(covered, total)) + print("Create coverage\n", file=sys.stderr) + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/dnc/azext_dnc/tests/latest/__init__.py b/src/dnc/azext_dnc/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dnc/azext_dnc/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dnc/azext_dnc/tests/latest/example_steps.py b/src/dnc/azext_dnc/tests/latest/example_steps.py new file mode 100644 index 00000000000..d1324fdf012 --- /dev/null +++ b/src/dnc/azext_dnc/tests/latest/example_steps.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +from .. import try_manual + + +# EXAMPLE: /Controller/put/Create controller +@try_manual +def step_controller_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller create ' + '--location "West US" ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /Controller/get/Get details of a controller +@try_manual +def step_controller_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller show ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/put/put delegated subnet +@try_manual +def step_delegated_subnet_service_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service create ' + '--location "West US" ' + '--id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DelegatedNetwork/controlle' + 'r/{myController2}" ' + '--subnet-details-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Network/vir' + 'tualNetworks/{vn}/subnets/default" ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by subscription +@try_manual +def step_delegated_subnet_service_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get details of a delegated subnet +@try_manual +def step_delegated_subnet_service_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service show ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/put/Create orchestrator instance +@try_manual +def step_orchestrator_instance_service_create(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service create ' + '--type "SystemAssigned" ' + '--location "West US" ' + '--api-server-endpoint "https://testk8s.cloudapp.net" ' + '--cluster-root-ca "ddsadsad344mfdsfdl" ' + '--id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DelegatedNetwork/controlle' + 'r/{myController}" ' + '--orchestrator-app-id "546192d7-503f-477a-9cfe-4efc3ee2b6e1" ' + '--orchestrator-tenant-id "da6192d7-503f-477a-9cfe-4efc3ee2b6c3" ' + '--priv-link-resource-id "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Network' + '/privateLinkServices/plresource1" ' + '--resource-group "{rg}" ' + '--resource-name "testk8s1"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/get/Get details of a orchestratorInstance +@try_manual +def step_orchestrator_instance_service_show(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service show ' + '--resource-group "{rg}" ' + '--resource-name "testk8s1"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/get/Get OrchestratorInstance resources by resource group +@try_manual +def step_orchestrator_instance_service_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/get/Get orchestratorInstance resources by subscription +@try_manual +def step_orchestrator_instance_service_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /OrchestratorInstanceService/delete/Delete Orchestrator Instance +@try_manual +def step_orchestrator_instance_service_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc orchestrator-instance-service delete -y ' + '--resource-group "{rg}" ' + '--resource-name "k8stest1"', + checks=checks) + + +# EXAMPLE: /Controller/delete/Delete controller +@try_manual +def step_controller_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc controller delete -y ' + '--resource-group "{rg}" ' + '--resource-name "{myController}"', + checks=checks) + + +# EXAMPLE: /DelegatedNetwork/get/Get DelegatedController resources by subscription +@try_manual +def step_delegated_network_list(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-network list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /DelegatedNetwork/get/Get DelegatedNetwork resources by resource group +@try_manual +def step_delegated_network_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-network list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by resource group +@try_manual +def step_delegated_subnet_service_list2(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service list ' + '--resource-group "{rg_2}"', + checks=checks) + + +# EXAMPLE: /DelegatedSubnetService/delete/delete delegated subnet +@try_manual +def step_delegated_subnet_service_delete(test, rg, rg_2, checks=None): + if checks is None: + checks = [] + test.cmd('az dnc delegated-subnet-service delete -y ' + '--resource-group "{rg}" ' + '--resource-name "delegated1"', + checks=checks) + diff --git a/src/dnc/azext_dnc/tests/latest/preparers.py b/src/dnc/azext_dnc/tests/latest/preparers.py new file mode 100644 index 00000000000..0879e51945a --- /dev/null +++ b/src/dnc/azext_dnc/tests/latest/preparers.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from datetime import datetime +from azure_devtools.scenario_tests import SingleValueReplacer +from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer +from azure.cli.testsdk.exceptions import CliTestError +from azure.cli.testsdk.reverse_dependency import get_dummy_cli + + +KEY_RESOURCE_GROUP = 'rg' +KEY_VIRTUAL_NETWORK = 'vnet' +KEY_VNET_SUBNET = 'subnet' +KEY_VNET_NIC = 'nic' + + +class VirtualNetworkPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='virtual_network', + resource_group_name=None, + resource_group_key=KEY_RESOURCE_GROUP, + dev_setting_name='AZURE_CLI_TEST_DEV_VIRTUAL_NETWORK_NAME', + random_name_length=24, key=KEY_VIRTUAL_NETWORK): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VirtualNetworkPreparer, self).__init__( + name_prefix, random_name_length) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group_name = resource_group_name + self.resource_group_key = resource_group_key + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group_name: + self.resource_group_name = self.test_class_instance.kwargs.get( + self.resource_group_key) + if not self.resource_group_name: + raise CliTestError("Error: No resource group configured!") + + tags = {'product': 'azurecli', 'cause': 'automation', + 'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')} + if 'ENV_JOB_NAME' in os.environ: + tags['job'] = os.environ['ENV_JOB_NAME'] + tags = ' '.join(['{}={}'.format(key, value) + for key, value in tags.items()]) + template = 'az network vnet create --resource-group {} --name {} --subnet-name default --tag ' + tags + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group_name, name)) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + # delete vnet if test is being recorded and if the vnet is not a dev rg + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network vnet delete --name {} --resource-group {}'.format(name, self.resource_group_name)) + + +class VnetSubnetPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.vn', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + address_prefixes="11.0.0.0/24", + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_SUBNET_NAME', + key=KEY_VNET_SUBNET): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetSubnetPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.address_prefixes = address_prefixes + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + self.test_class_instance.kwargs[self.key] = 'default' + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + pass + + +class VnetNicPreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest.nic', + parameter_name='subnet', + resource_group_key=KEY_RESOURCE_GROUP, + vnet_key=KEY_VIRTUAL_NETWORK, + dev_setting_name='AZURE_CLI_TEST_DEV_VNET_NIC_NAME', + key=KEY_VNET_NIC): + if ' ' in name_prefix: + raise CliTestError( + 'Error: Space character in name prefix \'%s\'' % name_prefix) + super(VnetNicPreparer, self).__init__(name_prefix, 15) + self.cli_ctx = get_dummy_cli() + self.parameter_name = parameter_name + self.key = key + self.resource_group = [resource_group_key, None] + self.vnet = [vnet_key, None] + self.dev_setting_name = os.environ.get(dev_setting_name, None) + + def create_resource(self, name, **_): + if self.dev_setting_name: + return {self.parameter_name: self.dev_setting_name, } + + if not self.resource_group[1]: + self.resource_group[1] = self.test_class_instance.kwargs.get( + self.resource_group[0]) + if not self.resource_group[1]: + raise CliTestError("Error: No resource group configured!") + if not self.vnet[1]: + self.vnet[1] = self.test_class_instance.kwargs.get(self.vnet[0]) + if not self.vnet[1]: + raise CliTestError("Error: No vnet configured!") + + template = 'az network nic create --resource-group {} --name {} --vnet-name {} --subnet default ' + self.live_only_execute(self.cli_ctx, template.format( + self.resource_group[1], name, self.vnet[1])) + + self.test_class_instance.kwargs[self.key] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **_): + if not self.dev_setting_name: + self.live_only_execute( + self.cli_ctx, + 'az network nic delete --name {} --resource-group {}'.format(name, self.resource_group[1])) diff --git a/src/dnc/azext_dnc/tests/latest/recordings/test_dnc_Scenario.yaml b/src/dnc/azext_dnc/tests/latest/recordings/test_dnc_Scenario.yaml new file mode 100644 index 00000000000..b8aa382f14e --- /dev/null +++ b/src/dnc/azext_dnc/tests/latest/recordings/test_dnc_Scenario.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: '{"location": "eastus2euap"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc controller create + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/json + ParameterSetName: + - --location --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller?api-version=2021-03-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller","location":"eastus2euap","name":"testcontroller","type":"Microsoft.DelegatedNetwork/controller","properties":{"controllerProperties":{"dncAppId":"a91b1853-4403-4f54-b5cb-d1ea19d90c37","dncEndpoint":"https://openai-eastus2euap.dnc.azure.com","dncTenantId":null},"resourceGuid":"5c7e26be-7ff9-4aaf-9e16-0bc759605aea","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '562' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:08:16 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc controller show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller?api-version=2021-03-15 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller","location":"eastus2euap","name":"testcontroller","type":"Microsoft.DelegatedNetwork/controller","properties":{"controllerProperties":{"dncAppId":"a91b1853-4403-4f54-b5cb-d1ea19d90c37","dncEndpoint":"https://openai-eastus2euap.dnc.azure.com","dncTenantId":null},"resourceGuid":"5c7e26be-7ff9-4aaf-9e16-0bc759605aea","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '562' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:08:18 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + 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: '{"location": "eastus2euap", "properties": {"subnetDetails": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitest000003/subnets/default"}, + "controllerDetails": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/controller/testcontroller"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - dnc delegated-subnet-service create + Connection: + - keep-alive + Content-Length: + - '537' + Content-Type: + - application/json + ParameterSetName: + - --location --id --subnet-details-id --resource-group --resource-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-dnc/1.0.0b1 Python/3.9.5 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DelegatedNetwork/delegatedSubnets/delegated1?api-version=2021-03-15 + response: + body: + string: '{"ErrorResponse":{"error":{"code":"400","message":"Error in API: PutDelegateSubnetResourceId: + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitest000003 + is created in a different location: westus, Expected Location: eastus2euapInternalErrorCode: + InvalidVirtualNetworkLocation. ResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/clitest000003 + is created in a different location: westus, Expected Location: eastus2euap","details":null}}}' + headers: + cache-control: + - no-cache + content-length: + - '747' + content-type: + - application/json + date: + - Wed, 09 Jun 2021 00:08:22 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:82487bea-6925-46b8-a5c9-0bcae97f8f27 + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/dnc/azext_dnc/tests/latest/test_dnc_scenario.py b/src/dnc/azext_dnc/tests/latest/test_dnc_scenario.py new file mode 100644 index 00000000000..511626fb006 --- /dev/null +++ b/src/dnc/azext_dnc/tests/latest/test_dnc_scenario.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer +from .preparers import VirtualNetworkPreparer +from .example_steps import step_controller_create +from .example_steps import step_controller_show +from .example_steps import step_delegated_subnet_service_create +from .example_steps import step_delegated_subnet_service_list +from .example_steps import step_delegated_subnet_service_show +from .example_steps import step_orchestrator_instance_service_create +from .example_steps import step_orchestrator_instance_service_show +from .example_steps import step_orchestrator_instance_service_list +from .example_steps import step_orchestrator_instance_service_list2 +from .example_steps import step_orchestrator_instance_service_delete +from .example_steps import step_controller_delete +from .example_steps import step_delegated_network_list +from .example_steps import step_delegated_network_list2 +from .example_steps import step_delegated_subnet_service_list2 +from .example_steps import step_delegated_subnet_service_delete +from .. import ( + try_manual, + raise_if, + calc_coverage +) + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +# Env setup_scenario +@try_manual +def setup_scenario(test, rg, rg_2): + pass + + +# Env cleanup_scenario +@try_manual +def cleanup_scenario(test, rg, rg_2): + pass + + +# Testcase: Scenario +@try_manual +def call_scenario(test, rg, rg_2): + setup_scenario(test, rg, rg_2) + step_controller_create(test, rg, rg_2, checks=[]) + step_controller_show(test, rg, rg_2, checks=[]) + step_delegated_subnet_service_create(test, rg, rg_2, checks=[]) + step_delegated_subnet_service_list(test, rg, rg_2, checks=[]) + step_delegated_subnet_service_show(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_create(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_show(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_list(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_list2(test, rg, rg_2, checks=[]) + step_orchestrator_instance_service_delete(test, rg, rg_2, checks=[]) + step_controller_delete(test, rg, rg_2, checks=[]) + step_delegated_network_list(test, rg, rg_2, checks=[]) + step_delegated_network_list2(test, rg, rg_2, checks=[]) + step_delegated_subnet_service_list2(test, rg, rg_2, checks=[]) + step_delegated_subnet_service_delete(test, rg, rg_2, checks=[]) + cleanup_scenario(test, rg, rg_2) + + +# Test class for Scenario +@try_manual +class DncScenarioTest(ScenarioTest): + + def __init__(self, *args, **kwargs): + super(DncScenarioTest, self).__init__(*args, **kwargs) + self.kwargs.update({ + 'subscription_id': self.get_subscription_id() + }) + + self.kwargs.update({ + 'myController': 'testcontroller', + 'myController2': 'dnctestcontroller', + }) + + + @ResourceGroupPreparer(name_prefix='clitestdnc_TestRG'[:7], key='rg', parameter_name='rg') + @ResourceGroupPreparer(name_prefix='clitestdnc_testRG'[:7], key='rg_2', parameter_name='rg_2') + @VirtualNetworkPreparer(name_prefix='clitestdnc_testvnet'[:7], key='vn', resource_group_key='rg') + def test_dnc_Scenario(self, rg, rg_2): + call_scenario(self, rg, rg_2) + calc_coverage(__file__) + raise_if() + diff --git a/src/dnc/azext_dnc/vendored_sdks/__init__.py b/src/dnc/azext_dnc/vendored_sdks/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/__init__.py new file mode 100644 index 00000000000..17177114514 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._dnc import DNC +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DNC'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/_configuration.py b/src/dnc/azext_dnc/vendored_sdks/dnc/_configuration.py new file mode 100644 index 00000000000..2e1bb8a30c8 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class DNCConfiguration(Configuration): + """Configuration for DNC. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DNCConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-03-15" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-dnc/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/_dnc.py b/src/dnc/azext_dnc/vendored_sdks/dnc/_dnc.py new file mode 100644 index 00000000000..1bc9b9160fb --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/_dnc.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import DNCConfiguration +from .operations import ControllerOperations +from .operations import DelegatedNetworkOperations +from .operations import OrchestratorInstanceServiceOperations +from .operations import DelegatedSubnetServiceOperations +from .operations import Operations +from . import models + + +class DNC(object): + """DNC web api provides way to create, get and delete dnc controller. + + :ivar controller: ControllerOperations operations + :vartype controller: dnc.operations.ControllerOperations + :ivar delegated_network: DelegatedNetworkOperations operations + :vartype delegated_network: dnc.operations.DelegatedNetworkOperations + :ivar orchestrator_instance_service: OrchestratorInstanceServiceOperations operations + :vartype orchestrator_instance_service: dnc.operations.OrchestratorInstanceServiceOperations + :ivar delegated_subnet_service: DelegatedSubnetServiceOperations operations + :vartype delegated_subnet_service: dnc.operations.DelegatedSubnetServiceOperations + :ivar operations: Operations operations + :vartype operations: dnc.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DNCConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.controller = ControllerOperations( + self._client, self._config, self._serialize, self._deserialize) + self.delegated_network = DelegatedNetworkOperations( + self._client, self._config, self._serialize, self._deserialize) + self.orchestrator_instance_service = OrchestratorInstanceServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + self.delegated_subnet_service = DelegatedSubnetServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DNC + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/_version.py b/src/dnc/azext_dnc/vendored_sdks/dnc/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/__init__.py new file mode 100644 index 00000000000..eee4efec6cf --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._dnc import DNC +__all__ = ['DNC'] diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_configuration.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_configuration.py new file mode 100644 index 00000000000..778374290af --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DNCConfiguration(Configuration): + """Configuration for DNC. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DNCConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-03-15" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-dnc/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_dnc.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_dnc.py new file mode 100644 index 00000000000..dc49d9ea1d7 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/_dnc.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DNCConfiguration +from .operations import ControllerOperations +from .operations import DelegatedNetworkOperations +from .operations import OrchestratorInstanceServiceOperations +from .operations import DelegatedSubnetServiceOperations +from .operations import Operations +from .. import models + + +class DNC(object): + """DNC web api provides way to create, get and delete dnc controller. + + :ivar controller: ControllerOperations operations + :vartype controller: dnc.aio.operations.ControllerOperations + :ivar delegated_network: DelegatedNetworkOperations operations + :vartype delegated_network: dnc.aio.operations.DelegatedNetworkOperations + :ivar orchestrator_instance_service: OrchestratorInstanceServiceOperations operations + :vartype orchestrator_instance_service: dnc.aio.operations.OrchestratorInstanceServiceOperations + :ivar delegated_subnet_service: DelegatedSubnetServiceOperations operations + :vartype delegated_subnet_service: dnc.aio.operations.DelegatedSubnetServiceOperations + :ivar operations: Operations operations + :vartype operations: dnc.aio.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DNCConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.controller = ControllerOperations( + self._client, self._config, self._serialize, self._deserialize) + self.delegated_network = DelegatedNetworkOperations( + self._client, self._config, self._serialize, self._deserialize) + self.orchestrator_instance_service = OrchestratorInstanceServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + self.delegated_subnet_service = DelegatedSubnetServiceOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DNC": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/__init__.py new file mode 100644 index 00000000000..bd4224d51ca --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/__init__.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._controller_operations import ControllerOperations +from ._delegated_network_operations import DelegatedNetworkOperations +from ._orchestrator_instance_service_operations import OrchestratorInstanceServiceOperations +from ._delegated_subnet_service_operations import DelegatedSubnetServiceOperations +from ._operations import Operations + +__all__ = [ + 'ControllerOperations', + 'DelegatedNetworkOperations', + 'OrchestratorInstanceServiceOperations', + 'DelegatedSubnetServiceOperations', + 'Operations', +] diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_controller_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_controller_operations.py new file mode 100644 index 00000000000..632890191ef --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_controller_operations.py @@ -0,0 +1,411 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ControllerOperations: + """ControllerOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_details( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "models.DelegatedController": + """Gets details about the specified dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedController, or the result of cls(response) + :rtype: ~dnc.models.DelegatedController + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.DelegatedController", + **kwargs + ) -> "models.DelegatedController": + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DelegatedController') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.DelegatedController", + **kwargs + ) -> AsyncLROPoller["models.DelegatedController"]: + """Create a dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: controller type parameters. + :type parameters: ~dnc.models.DelegatedController + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DelegatedController or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~dnc.models.DelegatedController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes the DNC controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + async def patch( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.ControllerResourceUpdateParameters", + **kwargs + ) -> "models.DelegatedController": + """Update dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: controller type parameters. + :type parameters: ~dnc.models.ControllerResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedController, or the result of cls(response) + :rtype: ~dnc.models.DelegatedController + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ControllerResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_network_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_network_operations.py new file mode 100644 index 00000000000..ae0c989eda8 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_network_operations.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DelegatedNetworkOperations: + """DelegatedNetworkOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.DelegatedControllers"]: + """Get all the delegatedController resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedControllers or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.DelegatedControllers] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedControllers"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedControllers', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/controllers'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.DelegatedControllers"]: + """Get all the delegatedController resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedControllers or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.DelegatedControllers] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedControllers"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedControllers', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controllers'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_subnet_service_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_subnet_service_operations.py new file mode 100644 index 00000000000..336c2f36569 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_delegated_subnet_service_operations.py @@ -0,0 +1,615 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DelegatedSubnetServiceOperations: + """DelegatedSubnetServiceOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_details( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "models.DelegatedSubnet": + """Gets details about the specified dnc DelegatedSubnet Link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedSubnet, or the result of cls(response) + :rtype: ~dnc.models.DelegatedSubnet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def _put_details_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.DelegatedSubnet", + **kwargs + ) -> "models.DelegatedSubnet": + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._put_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DelegatedSubnet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _put_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def begin_put_details( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.DelegatedSubnet", + **kwargs + ) -> AsyncLROPoller["models.DelegatedSubnet"]: + """Put delegated subnet resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: Delegated subnet details. + :type parameters: ~dnc.models.DelegatedSubnet + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DelegatedSubnet or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~dnc.models.DelegatedSubnet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._put_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def _patch_details_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.ResourceUpdateParameters", + **kwargs + ) -> "models.DelegatedSubnet": + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._patch_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _patch_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def begin_patch_details( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.ResourceUpdateParameters", + **kwargs + ) -> AsyncLROPoller["models.DelegatedSubnet"]: + """Patch delegated subnet resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: Delegated subnet details. + :type parameters: ~dnc.models.ResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DelegatedSubnet or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~dnc.models.DelegatedSubnet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._patch_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_patch_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def _delete_details_initial( + self, + resource_group_name: str, + resource_name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + async def begin_delete_details( + self, + resource_group_name: str, + resource_name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller[None]: + """Delete dnc DelegatedSubnet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param force_delete: Force delete resource. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.DelegatedSubnets"]: + """Get all the DelegatedSubnets resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedSubnets or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.DelegatedSubnets] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedSubnets', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/delegatedSubnets'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.DelegatedSubnets"]: + """Get all the DelegatedSubnets resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedSubnets or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.DelegatedSubnets] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedSubnets', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_operations.py new file mode 100644 index 00000000000..04b3994e6bb --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["models.OperationListResult"]: + """Lists all of the available DelegatedNetwork service REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DelegatedNetwork/operations'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_orchestrator_instance_service_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_orchestrator_instance_service_operations.py new file mode 100644 index 00000000000..1ddf6db32df --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/aio/operations/_orchestrator_instance_service_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OrchestratorInstanceServiceOperations: + """OrchestratorInstanceServiceOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_details( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "models.Orchestrator": + """Gets details about the orchestrator instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Orchestrator, or the result of cls(response) + :rtype: ~dnc.models.Orchestrator + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.Orchestrator", + **kwargs + ) -> "models.Orchestrator": + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Orchestrator') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.Orchestrator", + **kwargs + ) -> AsyncLROPoller["models.Orchestrator"]: + """Create a orchestrator instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: OrchestratorInstance type parameters. + :type parameters: ~dnc.models.Orchestrator + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Orchestrator or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~dnc.models.Orchestrator] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes the Orchestrator Instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param force_delete: Force delete resource. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + async def patch( + self, + resource_group_name: str, + resource_name: str, + parameters: "models.OrchestratorResourceUpdateParameters", + **kwargs + ) -> "models.Orchestrator": + """Update Orchestrator Instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: OrchestratorInstance update parameters. + :type parameters: ~dnc.models.OrchestratorResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Orchestrator, or the result of cls(response) + :rtype: ~dnc.models.Orchestrator + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'OrchestratorResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.Orchestrators"]: + """Get all the orchestratorInstance resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Orchestrators or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.Orchestrators] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrators"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('Orchestrators', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/orchestrators'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.Orchestrators"]: + """Get all the OrchestratorInstances resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Orchestrators or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~dnc.models.Orchestrators] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrators"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('Orchestrators', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py new file mode 100644 index 00000000000..6dcdd368f6b --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ControllerDetails + from ._models_py3 import ControllerResource + from ._models_py3 import ControllerResourceUpdateParameters + from ._models_py3 import DelegatedController + from ._models_py3 import DelegatedControllerProperties + from ._models_py3 import DelegatedControllers + from ._models_py3 import DelegatedSubnet + from ._models_py3 import DelegatedSubnetResource + from ._models_py3 import DelegatedSubnets + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import Orchestrator + from ._models_py3 import OrchestratorIdentity + from ._models_py3 import OrchestratorResource + from ._models_py3 import OrchestratorResourceProperties + from ._models_py3 import OrchestratorResourceUpdateParameters + from ._models_py3 import Orchestrators + from ._models_py3 import ResourceUpdateParameters + from ._models_py3 import SubnetDetails +except (SyntaxError, ImportError): + from ._models import ControllerDetails # type: ignore + from ._models import ControllerResource # type: ignore + from ._models import ControllerResourceUpdateParameters # type: ignore + from ._models import DelegatedController # type: ignore + from ._models import DelegatedControllerProperties # type: ignore + from ._models import DelegatedControllers # type: ignore + from ._models import DelegatedSubnet # type: ignore + from ._models import DelegatedSubnetResource # type: ignore + from ._models import DelegatedSubnets # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import Orchestrator # type: ignore + from ._models import OrchestratorIdentity # type: ignore + from ._models import OrchestratorResource # type: ignore + from ._models import OrchestratorResourceProperties # type: ignore + from ._models import OrchestratorResourceUpdateParameters # type: ignore + from ._models import Orchestrators # type: ignore + from ._models import ResourceUpdateParameters # type: ignore + from ._models import SubnetDetails # type: ignore + +from ._dnc_enums import ( + ActionType, + ControllerState, + DelegatedSubnetState, + OrchestratorInstanceState, + OrchestratorKind, + Origin, + ResourceIdentityType, +) + +__all__ = [ + 'ControllerDetails', + 'ControllerResource', + 'ControllerResourceUpdateParameters', + 'DelegatedController', + 'DelegatedControllerProperties', + 'DelegatedControllers', + 'DelegatedSubnet', + 'DelegatedSubnetResource', + 'DelegatedSubnets', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'Orchestrator', + 'OrchestratorIdentity', + 'OrchestratorResource', + 'OrchestratorResourceProperties', + 'OrchestratorResourceUpdateParameters', + 'Orchestrators', + 'ResourceUpdateParameters', + 'SubnetDetails', + 'ActionType', + 'ControllerState', + 'DelegatedSubnetState', + 'OrchestratorInstanceState', + 'OrchestratorKind', + 'Origin', + 'ResourceIdentityType', +] diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_dnc_enums.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_dnc_enums.py new file mode 100644 index 00000000000..4a50acbaa78 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_dnc_enums.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + """ + + INTERNAL = "Internal" + +class ControllerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of dnc controller resource. + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + PROVISIONING = "Provisioning" + +class DelegatedSubnetState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of dnc delegated subnet resource. + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + PROVISIONING = "Provisioning" + +class OrchestratorInstanceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of orchestratorInstance resource. + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + PROVISIONING = "Provisioning" + +class OrchestratorKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of workbook. Choices are user and shared. + """ + + KUBERNETES = "Kubernetes" + +class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is "user,system" + """ + + USER = "user" + SYSTEM = "system" + USER_SYSTEM = "user,system" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for orchestrator cluster. Type 'SystemAssigned' will use an + implicitly created identity orchestrator clusters + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py new file mode 100644 index 00000000000..1c2d5252031 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py @@ -0,0 +1,855 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ControllerDetails(msrest.serialization.Model): + """controller details. + + :param id: controller arm resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ControllerDetails, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ControllerResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ControllerResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ControllerResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ControllerResourceUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class DelegatedController(ControllerResource): + """Represents an instance of a DNC controller. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :ivar properties: Properties of the provision operation request. + :vartype properties: ~dnc.models.DelegatedControllerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'DelegatedControllerProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedController, self).__init__(**kwargs) + self.properties = None + + +class DelegatedControllerProperties(msrest.serialization.Model): + """Properties of Delegated controller resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of dnc controller resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.ControllerState + :ivar dnc_app_id: dnc application id should be used by customer to authenticate with dnc + gateway. + :vartype dnc_app_id: str + :ivar dnc_tenant_id: tenant id of dnc application id. + :vartype dnc_tenant_id: str + :ivar dnc_endpoint: dnc endpoint url that customers can use to connect to. + :vartype dnc_endpoint: str + """ + + _validation = { + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'dnc_app_id': {'readonly': True}, + 'dnc_tenant_id': {'readonly': True}, + 'dnc_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'dnc_app_id': {'key': 'dncAppId', 'type': 'str'}, + 'dnc_tenant_id': {'key': 'dncTenantId', 'type': 'str'}, + 'dnc_endpoint': {'key': 'dncEndpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedControllerProperties, self).__init__(**kwargs) + self.resource_guid = None + self.provisioning_state = None + self.dnc_app_id = None + self.dnc_tenant_id = None + self.dnc_endpoint = None + + +class DelegatedControllers(msrest.serialization.Model): + """An array of Delegated controller resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of Delegated controller resources. + :type value: list[~dnc.models.DelegatedController] + :ivar next_link: The URL to get the next set of controllers. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DelegatedController]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedControllers, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DelegatedSubnetResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedSubnetResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class DelegatedSubnet(DelegatedSubnetResource): + """Represents an instance of a orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of dnc delegated subnet resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.DelegatedSubnetState + :param subnet_details: subnet details. + :type subnet_details: ~dnc.models.SubnetDetails + :param controller_details: Properties of the controller. + :type controller_details: ~dnc.models.ControllerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'subnet_details': {'key': 'properties.subnetDetails', 'type': 'SubnetDetails'}, + 'controller_details': {'key': 'properties.controllerDetails', 'type': 'ControllerDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedSubnet, self).__init__(**kwargs) + self.resource_guid = None + self.provisioning_state = None + self.subnet_details = kwargs.get('subnet_details', None) + self.controller_details = kwargs.get('controller_details', None) + + +class DelegatedSubnets(msrest.serialization.Model): + """An array of DelegatedSubnet resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of DelegatedSubnet resources. + :type value: list[~dnc.models.DelegatedSubnet] + :ivar next_link: The URL to get the next set of DelegatedSubnet resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DelegatedSubnet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedSubnets, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~dnc.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~dnc.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~dnc.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class Operation(msrest.serialization.Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data- + plane operations and "false" for ARM/control-plane operations. + :vartype is_data_action: bool + :param display: Localized display information for this particular operation. + :type display: ~dnc.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", + "system", "user,system". + :vartype origin: str or ~dnc.models.Origin + :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for + internal only APIs. Possible values include: "Internal". + :vartype action_type: str or ~dnc.models.ActionType + """ + + _validation = { + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + 'origin': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = None + self.display = kwargs.get('display', None) + self.origin = None + self.action_type = None + + +class OperationDisplay(msrest.serialization.Model): + """Localized display information for this particular operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by the resource provider. + :vartype value: list[~dnc.models.Operation] + :ivar next_link: URL to get the next set of operation list results (if there are any). + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class OrchestratorResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param kind: Required. The kind of workbook. Choices are user and shared. Possible values + include: "Kubernetes". + :type kind: str or ~dnc.models.OrchestratorKind + :param identity: The identity of the orchestrator. + :type identity: ~dnc.models.OrchestratorIdentity + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'OrchestratorIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.kind = kwargs['kind'] + self.identity = kwargs.get('identity', None) + self.tags = kwargs.get('tags', None) + + +class Orchestrator(OrchestratorResource): + """Represents an instance of a orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param kind: Required. The kind of workbook. Choices are user and shared. Possible values + include: "Kubernetes". + :type kind: str or ~dnc.models.OrchestratorKind + :param identity: The identity of the orchestrator. + :type identity: ~dnc.models.OrchestratorIdentity + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :param properties: Properties of the provision operation request. + :type properties: ~dnc.models.OrchestratorResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'OrchestratorIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'OrchestratorResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(Orchestrator, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class OrchestratorIdentity(msrest.serialization.Model): + """OrchestratorIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by + orchestrator. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by orchestrator. + :vartype tenant_id: str + :param type: The type of identity used for orchestrator cluster. Type 'SystemAssigned' will use + an implicitly created identity orchestrator clusters. Possible values include: + "SystemAssigned", "None". + :type type: str or ~dnc.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class OrchestratorResourceProperties(msrest.serialization.Model): + """Properties of orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of orchestratorInstance resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.OrchestratorInstanceState + :param orchestrator_app_id: AAD ID used with apiserver. + :type orchestrator_app_id: str + :param orchestrator_tenant_id: TenantID of server App ID. + :type orchestrator_tenant_id: str + :param cluster_root_ca: RootCA certificate of kubernetes cluster base64 encoded. + :type cluster_root_ca: str + :param api_server_endpoint: K8s APIServer url. Either one of apiServerEndpoint or + privateLinkResourceId can be specified. + :type api_server_endpoint: str + :param private_link_resource_id: private link arm resource id. Either one of apiServerEndpoint + or privateLinkResourceId can be specified. + :type private_link_resource_id: str + :param controller_details: Required. Properties of the controller. + :type controller_details: ~dnc.models.ControllerDetails + """ + + _validation = { + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'controller_details': {'required': True}, + } + + _attribute_map = { + 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'orchestrator_app_id': {'key': 'orchestratorAppId', 'type': 'str'}, + 'orchestrator_tenant_id': {'key': 'orchestratorTenantId', 'type': 'str'}, + 'cluster_root_ca': {'key': 'clusterRootCA', 'type': 'str'}, + 'api_server_endpoint': {'key': 'apiServerEndpoint', 'type': 'str'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'controller_details': {'key': 'controllerDetails', 'type': 'ControllerDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorResourceProperties, self).__init__(**kwargs) + self.resource_guid = None + self.provisioning_state = None + self.orchestrator_app_id = kwargs.get('orchestrator_app_id', None) + self.orchestrator_tenant_id = kwargs.get('orchestrator_tenant_id', None) + self.cluster_root_ca = kwargs.get('cluster_root_ca', None) + self.api_server_endpoint = kwargs.get('api_server_endpoint', None) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.controller_details = kwargs['controller_details'] + + +class OrchestratorResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorResourceUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Orchestrators(msrest.serialization.Model): + """An array of OrchestratorInstance resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of OrchestratorInstance resources. + :type value: list[~dnc.models.Orchestrator] + :ivar next_link: The URL to get the next set of orchestrators. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Orchestrator]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Orchestrators, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class SubnetDetails(msrest.serialization.Model): + """Properties of orchestrator. + + :param id: subnet arm resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubnetDetails, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py new file mode 100644 index 00000000000..740650a1fae --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py @@ -0,0 +1,913 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._dnc_enums import * + + +class ControllerDetails(msrest.serialization.Model): + """controller details. + + :param id: controller arm resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ControllerDetails, self).__init__(**kwargs) + self.id = id + + +class ControllerResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ControllerResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ControllerResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ControllerResourceUpdateParameters, self).__init__(**kwargs) + self.tags = tags + + +class DelegatedController(ControllerResource): + """Represents an instance of a DNC controller. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :ivar properties: Properties of the provision operation request. + :vartype properties: ~dnc.models.DelegatedControllerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'DelegatedControllerProperties'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DelegatedController, self).__init__(location=location, tags=tags, **kwargs) + self.properties = None + + +class DelegatedControllerProperties(msrest.serialization.Model): + """Properties of Delegated controller resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of dnc controller resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.ControllerState + :ivar dnc_app_id: dnc application id should be used by customer to authenticate with dnc + gateway. + :vartype dnc_app_id: str + :ivar dnc_tenant_id: tenant id of dnc application id. + :vartype dnc_tenant_id: str + :ivar dnc_endpoint: dnc endpoint url that customers can use to connect to. + :vartype dnc_endpoint: str + """ + + _validation = { + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'dnc_app_id': {'readonly': True}, + 'dnc_tenant_id': {'readonly': True}, + 'dnc_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'dnc_app_id': {'key': 'dncAppId', 'type': 'str'}, + 'dnc_tenant_id': {'key': 'dncTenantId', 'type': 'str'}, + 'dnc_endpoint': {'key': 'dncEndpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DelegatedControllerProperties, self).__init__(**kwargs) + self.resource_guid = None + self.provisioning_state = None + self.dnc_app_id = None + self.dnc_tenant_id = None + self.dnc_endpoint = None + + +class DelegatedControllers(msrest.serialization.Model): + """An array of Delegated controller resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of Delegated controller resources. + :type value: list[~dnc.models.DelegatedController] + :ivar next_link: The URL to get the next set of controllers. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DelegatedController]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DelegatedController"], + **kwargs + ): + super(DelegatedControllers, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DelegatedSubnetResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DelegatedSubnetResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class DelegatedSubnet(DelegatedSubnetResource): + """Represents an instance of a orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of dnc delegated subnet resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.DelegatedSubnetState + :param subnet_details: subnet details. + :type subnet_details: ~dnc.models.SubnetDetails + :param controller_details: Properties of the controller. + :type controller_details: ~dnc.models.ControllerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'subnet_details': {'key': 'properties.subnetDetails', 'type': 'SubnetDetails'}, + 'controller_details': {'key': 'properties.controllerDetails', 'type': 'ControllerDetails'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + subnet_details: Optional["SubnetDetails"] = None, + controller_details: Optional["ControllerDetails"] = None, + **kwargs + ): + super(DelegatedSubnet, self).__init__(location=location, tags=tags, **kwargs) + self.resource_guid = None + self.provisioning_state = None + self.subnet_details = subnet_details + self.controller_details = controller_details + + +class DelegatedSubnets(msrest.serialization.Model): + """An array of DelegatedSubnet resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of DelegatedSubnet resources. + :type value: list[~dnc.models.DelegatedSubnet] + :ivar next_link: The URL to get the next set of DelegatedSubnet resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DelegatedSubnet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DelegatedSubnet"], + **kwargs + ): + super(DelegatedSubnets, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~dnc.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~dnc.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~dnc.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class Operation(msrest.serialization.Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data- + plane operations and "false" for ARM/control-plane operations. + :vartype is_data_action: bool + :param display: Localized display information for this particular operation. + :type display: ~dnc.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", + "system", "user,system". + :vartype origin: str or ~dnc.models.Origin + :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for + internal only APIs. Possible values include: "Internal". + :vartype action_type: str or ~dnc.models.ActionType + """ + + _validation = { + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + 'origin': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + *, + display: Optional["OperationDisplay"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = None + self.display = display + self.origin = None + self.action_type = None + + +class OperationDisplay(msrest.serialization.Model): + """Localized display information for this particular operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by the resource provider. + :vartype value: list[~dnc.models.Operation] + :ivar next_link: URL to get the next set of operation list results (if there are any). + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class OrchestratorResource(msrest.serialization.Model): + """Represents an instance of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param kind: Required. The kind of workbook. Choices are user and shared. Possible values + include: "Kubernetes". + :type kind: str or ~dnc.models.OrchestratorKind + :param identity: The identity of the orchestrator. + :type identity: ~dnc.models.OrchestratorIdentity + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'OrchestratorIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + kind: Union[str, "OrchestratorKind"], + location: Optional[str] = None, + identity: Optional["OrchestratorIdentity"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(OrchestratorResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.kind = kind + self.identity = identity + self.tags = tags + + +class Orchestrator(OrchestratorResource): + """Represents an instance of a orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: An identifier that represents the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of resource. + :vartype type: str + :param location: Location of the resource. + :type location: str + :param kind: Required. The kind of workbook. Choices are user and shared. Possible values + include: "Kubernetes". + :type kind: str or ~dnc.models.OrchestratorKind + :param identity: The identity of the orchestrator. + :type identity: ~dnc.models.OrchestratorIdentity + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :param properties: Properties of the provision operation request. + :type properties: ~dnc.models.OrchestratorResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'OrchestratorIdentity'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'OrchestratorResourceProperties'}, + } + + def __init__( + self, + *, + kind: Union[str, "OrchestratorKind"], + location: Optional[str] = None, + identity: Optional["OrchestratorIdentity"] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional["OrchestratorResourceProperties"] = None, + **kwargs + ): + super(Orchestrator, self).__init__(location=location, kind=kind, identity=identity, tags=tags, **kwargs) + self.properties = properties + + +class OrchestratorIdentity(msrest.serialization.Model): + """OrchestratorIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by + orchestrator. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by orchestrator. + :vartype tenant_id: str + :param type: The type of identity used for orchestrator cluster. Type 'SystemAssigned' will use + an implicitly created identity orchestrator clusters. Possible values include: + "SystemAssigned", "None". + :type type: str or ~dnc.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + **kwargs + ): + super(OrchestratorIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class OrchestratorResourceProperties(msrest.serialization.Model): + """Properties of orchestrator. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_guid: Resource guid. + :vartype resource_guid: str + :ivar provisioning_state: The current state of orchestratorInstance resource. Possible values + include: "Deleting", "Succeeded", "Failed", "Provisioning". + :vartype provisioning_state: str or ~dnc.models.OrchestratorInstanceState + :param orchestrator_app_id: AAD ID used with apiserver. + :type orchestrator_app_id: str + :param orchestrator_tenant_id: TenantID of server App ID. + :type orchestrator_tenant_id: str + :param cluster_root_ca: RootCA certificate of kubernetes cluster base64 encoded. + :type cluster_root_ca: str + :param api_server_endpoint: K8s APIServer url. Either one of apiServerEndpoint or + privateLinkResourceId can be specified. + :type api_server_endpoint: str + :param private_link_resource_id: private link arm resource id. Either one of apiServerEndpoint + or privateLinkResourceId can be specified. + :type private_link_resource_id: str + :param controller_details: Required. Properties of the controller. + :type controller_details: ~dnc.models.ControllerDetails + """ + + _validation = { + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'controller_details': {'required': True}, + } + + _attribute_map = { + 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'orchestrator_app_id': {'key': 'orchestratorAppId', 'type': 'str'}, + 'orchestrator_tenant_id': {'key': 'orchestratorTenantId', 'type': 'str'}, + 'cluster_root_ca': {'key': 'clusterRootCA', 'type': 'str'}, + 'api_server_endpoint': {'key': 'apiServerEndpoint', 'type': 'str'}, + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'controller_details': {'key': 'controllerDetails', 'type': 'ControllerDetails'}, + } + + def __init__( + self, + *, + controller_details: "ControllerDetails", + orchestrator_app_id: Optional[str] = None, + orchestrator_tenant_id: Optional[str] = None, + cluster_root_ca: Optional[str] = None, + api_server_endpoint: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + **kwargs + ): + super(OrchestratorResourceProperties, self).__init__(**kwargs) + self.resource_guid = None + self.provisioning_state = None + self.orchestrator_app_id = orchestrator_app_id + self.orchestrator_tenant_id = orchestrator_tenant_id + self.cluster_root_ca = cluster_root_ca + self.api_server_endpoint = api_server_endpoint + self.private_link_resource_id = private_link_resource_id + self.controller_details = controller_details + + +class OrchestratorResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(OrchestratorResourceUpdateParameters, self).__init__(**kwargs) + self.tags = tags + + +class Orchestrators(msrest.serialization.Model): + """An array of OrchestratorInstance resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of OrchestratorInstance resources. + :type value: list[~dnc.models.Orchestrator] + :ivar next_link: The URL to get the next set of orchestrators. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Orchestrator]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Orchestrator"], + **kwargs + ): + super(Orchestrators, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceUpdateParameters(msrest.serialization.Model): + """Parameters for updating a resource. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ResourceUpdateParameters, self).__init__(**kwargs) + self.tags = tags + + +class SubnetDetails(msrest.serialization.Model): + """Properties of orchestrator. + + :param id: subnet arm resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(SubnetDetails, self).__init__(**kwargs) + self.id = id diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/__init__.py new file mode 100644 index 00000000000..bd4224d51ca --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/__init__.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._controller_operations import ControllerOperations +from ._delegated_network_operations import DelegatedNetworkOperations +from ._orchestrator_instance_service_operations import OrchestratorInstanceServiceOperations +from ._delegated_subnet_service_operations import DelegatedSubnetServiceOperations +from ._operations import Operations + +__all__ = [ + 'ControllerOperations', + 'DelegatedNetworkOperations', + 'OrchestratorInstanceServiceOperations', + 'DelegatedSubnetServiceOperations', + 'Operations', +] diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_controller_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_controller_operations.py new file mode 100644 index 00000000000..405b1866ae9 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_controller_operations.py @@ -0,0 +1,421 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ControllerOperations(object): + """ControllerOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_details( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedController" + """Gets details about the specified dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedController, or the result of cls(response) + :rtype: ~dnc.models.DelegatedController + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.DelegatedController" + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedController" + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DelegatedController') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.DelegatedController" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DelegatedController"] + """Create a dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: controller type parameters. + :type parameters: ~dnc.models.DelegatedController + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DelegatedController or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~dnc.models.DelegatedController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the DNC controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore + + def patch( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.ControllerResourceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedController" + """Update dnc controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: controller type parameters. + :type parameters: ~dnc.models.ControllerResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedController, or the result of cls(response) + :rtype: ~dnc.models.DelegatedController + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedController"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ControllerResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedController', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controller/{resourceName}'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_network_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_network_operations.py new file mode 100644 index 00000000000..17ab9cce444 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_network_operations.py @@ -0,0 +1,186 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DelegatedNetworkOperations(object): + """DelegatedNetworkOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DelegatedControllers"] + """Get all the delegatedController resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedControllers or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.DelegatedControllers] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedControllers"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedControllers', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/controllers'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DelegatedControllers"] + """Get all the delegatedController resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedControllers or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.DelegatedControllers] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedControllers"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedControllers', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/controllers'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_subnet_service_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_subnet_service_operations.py new file mode 100644 index 00000000000..853c8466489 --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_delegated_subnet_service_operations.py @@ -0,0 +1,628 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DelegatedSubnetServiceOperations(object): + """DelegatedSubnetServiceOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_details( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedSubnet" + """Gets details about the specified dnc DelegatedSubnet Link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DelegatedSubnet, or the result of cls(response) + :rtype: ~dnc.models.DelegatedSubnet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def _put_details_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.DelegatedSubnet" + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedSubnet" + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._put_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DelegatedSubnet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _put_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def begin_put_details( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.DelegatedSubnet" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DelegatedSubnet"] + """Put delegated subnet resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: Delegated subnet details. + :type parameters: ~dnc.models.DelegatedSubnet + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DelegatedSubnet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~dnc.models.DelegatedSubnet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._put_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def _patch_details_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.ResourceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "models.DelegatedSubnet" + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._patch_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _patch_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def begin_patch_details( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.ResourceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DelegatedSubnet"] + """Patch delegated subnet resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: Delegated subnet details. + :type parameters: ~dnc.models.ResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DelegatedSubnet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~dnc.models.DelegatedSubnet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._patch_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DelegatedSubnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_patch_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def _delete_details_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_details_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_details_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def begin_delete_details( + self, + resource_group_name, # type: str + resource_name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete dnc DelegatedSubnet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param force_delete: Force delete resource. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_details_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets/{resourceName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DelegatedSubnets"] + """Get all the DelegatedSubnets resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedSubnets or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.DelegatedSubnets] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedSubnets', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/delegatedSubnets'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DelegatedSubnets"] + """Get all the DelegatedSubnets resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DelegatedSubnets or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.DelegatedSubnets] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DelegatedSubnets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DelegatedSubnets', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/delegatedSubnets'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_operations.py new file mode 100644 index 00000000000..63a086b1dcb --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.OperationListResult"] + """Lists all of the available DelegatedNetwork service REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DelegatedNetwork/operations'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_orchestrator_instance_service_operations.py b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_orchestrator_instance_service_operations.py new file mode 100644 index 00000000000..51b945c7fbe --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/operations/_orchestrator_instance_service_operations.py @@ -0,0 +1,569 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OrchestratorInstanceServiceOperations(object): + """OrchestratorInstanceServiceOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~dnc.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_details( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Orchestrator" + """Gets details about the orchestrator instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Orchestrator, or the result of cls(response) + :rtype: ~dnc.models.Orchestrator + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.Orchestrator" + **kwargs # type: Any + ): + # type: (...) -> "models.Orchestrator" + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Orchestrator') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.Orchestrator" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.Orchestrator"] + """Create a orchestrator instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: OrchestratorInstance type parameters. + :type parameters: ~dnc.models.Orchestrator + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Orchestrator or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~dnc.models.Orchestrator] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the Orchestrator Instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param force_delete: Force delete resource. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def patch( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "models.OrchestratorResourceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "models.Orchestrator" + """Update Orchestrator Instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the resource. It must be a minimum of 3 characters, and a + maximum of 63. + :type resource_name: str + :param parameters: OrchestratorInstance update parameters. + :type parameters: ~dnc.models.OrchestratorResourceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Orchestrator, or the result of cls(response) + :rtype: ~dnc.models.Orchestrator + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrator"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'OrchestratorResourceUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Orchestrator', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators/{resourceName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.Orchestrators"] + """Get all the orchestratorInstance resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Orchestrators or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.Orchestrators] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrators"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('Orchestrators', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DelegatedNetwork/orchestrators'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.Orchestrators"] + """Get all the OrchestratorInstances resources in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either Orchestrators or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~dnc.models.Orchestrators] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Orchestrators"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('Orchestrators', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DelegatedNetwork/orchestrators'} # type: ignore diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/py.typed b/src/dnc/azext_dnc/vendored_sdks/dnc/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/dnc/report.md b/src/dnc/report.md new file mode 100644 index 00000000000..8a7dad07768 --- /dev/null +++ b/src/dnc/report.md @@ -0,0 +1,247 @@ +# Azure CLI Module Creation Report + +## EXTENSION +|CLI Extension|Command Groups| +|---------|------------| +|az dnc|[groups](#CommandGroups) + +## GROUPS +### Command groups in `az dnc` extension +|CLI Command Group|Group Swagger name|Commands| +|---------|------------|--------| +|az dnc controller|Controller|[commands](#CommandsInController)| +|az dnc delegated-network|DelegatedNetwork|[commands](#CommandsInDelegatedNetwork)| +|az dnc orchestrator-instance-service|OrchestratorInstanceService|[commands](#CommandsInOrchestratorInstanceService)| +|az dnc delegated-subnet-service|DelegatedSubnetService|[commands](#CommandsInDelegatedSubnetService)| + +## COMMANDS +### Commands in `az dnc controller` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az dnc controller show](#ControllerGetDetails)|GetDetails|[Parameters](#ParametersControllerGetDetails)|[Example](#ExamplesControllerGetDetails)| +|[az dnc controller create](#ControllerCreate)|Create|[Parameters](#ParametersControllerCreate)|[Example](#ExamplesControllerCreate)| +|[az dnc controller delete](#ControllerDelete)|Delete|[Parameters](#ParametersControllerDelete)|[Example](#ExamplesControllerDelete)| + +### Commands in `az dnc delegated-network` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az dnc delegated-network list](#DelegatedNetworkListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersDelegatedNetworkListByResourceGroup)|[Example](#ExamplesDelegatedNetworkListByResourceGroup)| +|[az dnc delegated-network list](#DelegatedNetworkListBySubscription)|ListBySubscription|[Parameters](#ParametersDelegatedNetworkListBySubscription)|[Example](#ExamplesDelegatedNetworkListBySubscription)| + +### Commands in `az dnc delegated-subnet-service` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az dnc delegated-subnet-service list](#DelegatedSubnetServiceListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersDelegatedSubnetServiceListByResourceGroup)|[Example](#ExamplesDelegatedSubnetServiceListByResourceGroup)| +|[az dnc delegated-subnet-service list](#DelegatedSubnetServiceListBySubscription)|ListBySubscription|[Parameters](#ParametersDelegatedSubnetServiceListBySubscription)|[Example](#ExamplesDelegatedSubnetServiceListBySubscription)| +|[az dnc delegated-subnet-service show](#DelegatedSubnetServiceGetDetails)|GetDetails|[Parameters](#ParametersDelegatedSubnetServiceGetDetails)|[Example](#ExamplesDelegatedSubnetServiceGetDetails)| +|[az dnc delegated-subnet-service create](#DelegatedSubnetServicePutDetails)|PutDetails|[Parameters](#ParametersDelegatedSubnetServicePutDetails)|[Example](#ExamplesDelegatedSubnetServicePutDetails)| +|[az dnc delegated-subnet-service delete](#DelegatedSubnetServiceDeleteDetails)|DeleteDetails|[Parameters](#ParametersDelegatedSubnetServiceDeleteDetails)|[Example](#ExamplesDelegatedSubnetServiceDeleteDetails)| + +### Commands in `az dnc orchestrator-instance-service` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az dnc orchestrator-instance-service list](#OrchestratorInstanceServiceListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersOrchestratorInstanceServiceListByResourceGroup)|[Example](#ExamplesOrchestratorInstanceServiceListByResourceGroup)| +|[az dnc orchestrator-instance-service list](#OrchestratorInstanceServiceListBySubscription)|ListBySubscription|[Parameters](#ParametersOrchestratorInstanceServiceListBySubscription)|[Example](#ExamplesOrchestratorInstanceServiceListBySubscription)| +|[az dnc orchestrator-instance-service show](#OrchestratorInstanceServiceGetDetails)|GetDetails|[Parameters](#ParametersOrchestratorInstanceServiceGetDetails)|[Example](#ExamplesOrchestratorInstanceServiceGetDetails)| +|[az dnc orchestrator-instance-service create](#OrchestratorInstanceServiceCreate)|Create|[Parameters](#ParametersOrchestratorInstanceServiceCreate)|[Example](#ExamplesOrchestratorInstanceServiceCreate)| +|[az dnc orchestrator-instance-service delete](#OrchestratorInstanceServiceDelete)|Delete|[Parameters](#ParametersOrchestratorInstanceServiceDelete)|[Example](#ExamplesOrchestratorInstanceServiceDelete)| + + +## COMMAND DETAILS + +### group `az dnc controller` +#### Command `az dnc controller show` + +##### Example +``` +az dnc controller show --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| + +#### Command `az dnc controller create` + +##### Example +``` +az dnc controller create --location "West US" --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| +|**--location**|string|Location of the resource.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| + +#### Command `az dnc controller delete` + +##### Example +``` +az dnc controller delete --resource-group "TestRG" --resource-name "testcontroller" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| + +### group `az dnc delegated-network` +#### Command `az dnc delegated-network list` + +##### Example +``` +az dnc delegated-network list --resource-group "testRG" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| + +#### Command `az dnc delegated-network list` + +##### Example +``` +az dnc delegated-network list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +### group `az dnc delegated-subnet-service` +#### Command `az dnc delegated-subnet-service list` + +##### Example +``` +az dnc delegated-subnet-service list --resource-group "testRG" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| + +#### Command `az dnc delegated-subnet-service list` + +##### Example +``` +az dnc delegated-subnet-service list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az dnc delegated-subnet-service show` + +##### Example +``` +az dnc delegated-subnet-service show --resource-group "TestRG" --resource-name "delegated1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| + +#### Command `az dnc delegated-subnet-service create` + +##### Example +``` +az dnc delegated-subnet-service create --location "West US" --id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/r\ +esourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller" --subnet-details-id \ +"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/\ +testvnet/subnets/testsubnet" --resource-group "TestRG" --resource-name "delegated1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| +|**--location**|string|Location of the resource.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--id**|string|controller arm resource id|id|id| +|**--subnet-details-id**|string|subnet arm resource id|subnet_details_id|id| + +#### Command `az dnc delegated-subnet-service delete` + +##### Example +``` +az dnc delegated-subnet-service delete --resource-group "TestRG" --resource-name "delegated1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| +|**--force-delete**|boolean|Force delete resource|force_delete|forceDelete| + +### group `az dnc orchestrator-instance-service` +#### Command `az dnc orchestrator-instance-service list` + +##### Example +``` +az dnc orchestrator-instance-service list --resource-group "testRG" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| + +#### Command `az dnc orchestrator-instance-service list` + +##### Example +``` +az dnc orchestrator-instance-service list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +#### Command `az dnc orchestrator-instance-service show` + +##### Example +``` +az dnc orchestrator-instance-service show --resource-group "TestRG" --resource-name "testk8s1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| + +#### Command `az dnc orchestrator-instance-service create` + +##### Example +``` +az dnc orchestrator-instance-service create --type "SystemAssigned" --location "West US" --api-server-endpoint \ +"https://testk8s.cloudapp.net" --cluster-root-ca "ddsadsad344mfdsfdl" --id "/subscriptions/613192d7-503f-477a-9cfe-4efc\ +3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller" --orchestrator-app-id \ +"546192d7-503f-477a-9cfe-4efc3ee2b6e1" --orchestrator-tenant-id "da6192d7-503f-477a-9cfe-4efc3ee2b6c3" \ +--priv-link-resource-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.\ +Network/privateLinkServices/plresource1" --resource-group "TestRG" --resource-name "testk8s1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| +|**--location**|string|Location of the resource.|location|location| +|**--tags**|dictionary|The resource tags.|tags|tags| +|**--type**|sealed-choice|The type of identity used for orchestrator cluster. Type 'SystemAssigned' will use an implicitly created identity orchestrator clusters|type|type| +|**--orchestrator-app-id**|string|AAD ID used with apiserver|orchestrator_app_id|orchestratorAppId| +|**--orchestrator-tenant-id**|string|TenantID of server App ID|orchestrator_tenant_id|orchestratorTenantId| +|**--cluster-root-ca**|string|RootCA certificate of kubernetes cluster base64 encoded|cluster_root_ca|clusterRootCA| +|**--api-server-endpoint**|string|K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId can be specified|api_server_endpoint|apiServerEndpoint| +|**--private-link-resource-id**|string|private link arm resource id. Either one of apiServerEndpoint or privateLinkResourceId can be specified|private_link_resource_id|privateLinkResourceId| +|**--id**|string|controller arm resource id|id|id| + +#### Command `az dnc orchestrator-instance-service delete` + +##### Example +``` +az dnc orchestrator-instance-service delete --resource-group "TestRG" --resource-name "k8stest1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--resource-name**|string|The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.|resource_name|resourceName| +|**--force-delete**|boolean|Force delete resource|force_delete|forceDelete| diff --git a/src/dnc/setup.cfg b/src/dnc/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/dnc/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/dnc/setup.py b/src/dnc/setup.py new file mode 100644 index 00000000000..71d89822c42 --- /dev/null +++ b/src/dnc/setup.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages + +# HISTORY.rst entry. +VERSION = '0.1.0' +try: + from azext_dnc.manual.version import VERSION +except ImportError: + pass + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +try: + from azext_dnc.manual.dependency import DEPENDENCIES +except ImportError: + pass + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='dnc', + version=VERSION, + description='Microsoft Azure Command-Line Tools DNC Extension', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/dnc', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_dnc': ['azext_metadata.json']}, +) diff --git a/src/service_name.json b/src/service_name.json index 5d2ba7a2105..ab1de4b62e6 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -139,6 +139,11 @@ "AzureServiceName": "Azure Database Migration Service", "URL": "https://docs.microsoft.com/en-us/azure/dms/" }, + { + "Command": "az dnc", + "AzureServiceName": "Delegated Network Controller", + "URL": "" + }, { "Command": "az dt", "AzureServiceName": "Azure Digital Twins", From 608d9853080b385598b52de23c01fe8ad8ad7c76 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 10:19:55 +0800 Subject: [PATCH 14/37] [Release] Update index.json for extension [ dataprotection ] (#3481) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=938998 Last commit: https://github.com/Azure/azure-cli-extensions/commit/d2e621b89d3f71aac7fc8033b6e4544e98a1d046 --- src/index.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/index.json b/src/index.json index a925668a147..9d6f430b8f7 100644 --- a/src/index.json +++ b/src/index.json @@ -8460,6 +8460,59 @@ "sha256Digest": "0d68e01c4b7ef9ce6ccf7f2594f3faf19600dbb8ec7d395bc9ad4b4bdab8a245" } ], + "dataprotection": [ + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/dataprotection-0.1.0-py3-none-any.whl", + "filename": "dataprotection-0.1.0-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/dataprotection" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "dataprotection", + "run_requires": [ + { + "requires": [ + "azure-mgmt-resourcegraph" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools DataProtectionClient Extension", + "version": "0.1.0" + }, + "sha256Digest": "e98056945e1b5a1485c5c7137fa03bc5c482495f43556ee084eeb50f39a45831" + } + ], "datashare": [ { "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/datashare-0.1.0-py3-none-any.whl", From 72215af15d2519471af012e5ef18917dd903acd2 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 10:20:36 +0800 Subject: [PATCH 15/37] [Release] Update index.json for extension [ dnc ] (#3484) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=940565 Last commit: https://github.com/Azure/azure-cli-extensions/commit/9f0aa09e7652ee73b4d75fab064711e78fb99ab8 --- src/index.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/index.json b/src/index.json index 9d6f430b8f7..a4cbb71948c 100644 --- a/src/index.json +++ b/src/index.json @@ -9472,6 +9472,51 @@ "sha256Digest": "77680dfecb50e2a017314ff2b5f2e0340fec73f225b41f5668abc561aed088cd" } ], + "dnc": [ + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/dnc-0.1.0-py3-none-any.whl", + "filename": "dnc-0.1.0-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/dnc" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "dnc", + "summary": "Microsoft Azure Command-Line Tools DNC Extension", + "version": "0.1.0" + }, + "sha256Digest": "5398ed171b49fe0d27307caec0f6bf2f6310da0b877b5f3b6d8a0fd6e7f50cbe" + } + ], "eventgrid": [ { "downloadUrl": "https://eventgridcliextension.blob.core.windows.net/cli/eventgrid-0.4.4-py2.py3-none-any.whl", From 93e9d255537cb29edd0636e4f2ee5cb75460b290 Mon Sep 17 00:00:00 2001 From: Eric Mattingly Date: Wed, 9 Jun 2021 19:40:52 -0700 Subject: [PATCH 16/37] add logging settings to node config (#3483) --- src/aks-preview/HISTORY.md | 4 +++ src/aks-preview/azext_aks_preview/custom.py | 4 +++ .../tests/latest/data/kubeletconfig.json | 4 ++- .../test_aks_create_with_node_config.yaml | 26 ++++++++++++------- src/aks-preview/setup.py | 2 +- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 8db4cef062b..90ccfe7374d 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -2,6 +2,10 @@ Release History =============== +0.5.18 ++++++ +* Fix issue with node config not consuming logging settings + 0.5.17 +++++ * Add parameter '--enable-ultra-ssd' to enable UltraSSD on agent node pool diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 65b525ae16b..8cd80d9020d 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -3878,6 +3878,10 @@ def _get_kubelet_config(file_path): config_object.allowed_unsafe_sysctls = kubelet_config.get( "allowedUnsafeSysctls", None) config_object.fail_swap_on = kubelet_config.get("failSwapOn", None) + config_object.container_log_max_files = kubelet_config.get( + "containerLogMaxFiles", None) + config_object.container_log_max_size_mb = kubelet_config.get( + "containerLogMaxSizeMb", None) return config_object diff --git a/src/aks-preview/azext_aks_preview/tests/latest/data/kubeletconfig.json b/src/aks-preview/azext_aks_preview/tests/latest/data/kubeletconfig.json index 89fffb0cd2e..bbea5981549 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/data/kubeletconfig.json +++ b/src/aks-preview/azext_aks_preview/tests/latest/data/kubeletconfig.json @@ -9,5 +9,7 @@ "kernel.msg*", "net.*" ], - "failSwapOn": false + "failSwapOn": false, + "containerLogMaxFiles": 10, + "containerLogMaxSizeMb": 20 } \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_node_config.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_node_config.yaml index 905e4433368..9feb11386df 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_node_config.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_node_config.yaml @@ -291,7 +291,7 @@ interactions: "Delete", "kubeletConfig": {"cpuManagerPolicy": "static", "cpuCfsQuota": true, "cpuCfsQuotaPeriod": "200ms", "imageGcHighThreshold": 90, "imageGcLowThreshold": 70, "topologyManagerPolicy": "best-effort", "allowedUnsafeSysctls": ["kernel.msg*", - "net.*"], "failSwapOn": false}, "linuxOSConfig": {"sysctls": {"netCoreSomaxconn": + "net.*"], "failSwapOn": false, "containerLogMaxFiles": 10, "containerLogMaxSizeMb": 20}, "linuxOSConfig": {"sysctls": {"netCoreSomaxconn": 163849, "netIpv4TcpTwReuse": true, "netIpv4IpLocalPortRange": "32000 60000"}, "transparentHugePageEnabled": "madvise", "transparentHugePageDefrag": "defer+madvise", "swapFileSizeMB": 1500}, "name": "nodepool1"}], "linuxProfile": {"adminUsername": @@ -365,7 +365,7 @@ interactions: "Delete", "kubeletConfig": {"cpuManagerPolicy": "static", "cpuCfsQuota": true, "cpuCfsQuotaPeriod": "200ms", "imageGcHighThreshold": 90, "imageGcLowThreshold": 70, "topologyManagerPolicy": "best-effort", "allowedUnsafeSysctls": ["kernel.msg*", - "net.*"], "failSwapOn": false}, "linuxOSConfig": {"sysctls": {"netCoreSomaxconn": + "net.*"], "failSwapOn": false, "containerLogMaxFiles": 10, "containerLogMaxSizeMb": 20}, "linuxOSConfig": {"sysctls": {"netCoreSomaxconn": 163849, "netIpv4TcpTwReuse": true, "netIpv4IpLocalPortRange": "32000 60000"}, "transparentHugePageEnabled": "madvise", "transparentHugePageDefrag": "defer+madvise", "swapFileSizeMB": 1500}, "name": "nodepool1"}], "linuxProfile": {"adminUsername": @@ -420,7 +420,8 @@ interactions: \ \"200ms\",\n \"imageGcHighThreshold\": 90,\n \"imageGcLowThreshold\"\ : 70,\n \"topologyManagerPolicy\": \"best-effort\",\n \"allowedUnsafeSysctls\"\ : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\"\ - : false\n },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \ + : false,\n \"containerLogMaxFiles\": 10,\n \"containerLogMaxSizeMb\": + 20\n },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \ \ \"netCoreSomaxconn\": 163849,\n \"netIpv4TcpTwReuse\": true,\n \ \ \"netIpv4IpLocalPortRange\": \"32000 60000\"\n },\n \"transparentHugePageEnabled\"\ : \"madvise\",\n \"transparentHugePageDefrag\": \"defer+madvise\",\n\ @@ -799,7 +800,8 @@ interactions: \ \"200ms\",\n \"imageGcHighThreshold\": 90,\n \"imageGcLowThreshold\"\ : 70,\n \"topologyManagerPolicy\": \"best-effort\",\n \"allowedUnsafeSysctls\"\ : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\"\ - : false\n },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \ + : false,\n \"containerLogMaxFiles\": 10,\n \"containerLogMaxSizeMb\": + 20\n },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \ \ \"netCoreSomaxconn\": 163849,\n \"netIpv4TcpTwReuse\": true,\n \ \ \"netIpv4IpLocalPortRange\": \"32000 60000\"\n },\n \"transparentHugePageEnabled\"\ : \"madvise\",\n \"transparentHugePageDefrag\": \"defer+madvise\",\n\ @@ -882,7 +884,8 @@ interactions: \ \"cpuCfsQuotaPeriod\": \"200ms\",\n \"imageGcHighThreshold\":\ \ 90,\n \"imageGcLowThreshold\": 70,\n \"topologyManagerPolicy\"\ : \"best-effort\",\n \"allowedUnsafeSysctls\": [\n \"kernel.msg*\"\ - ,\n \"net.*\"\n ],\n \"failSwapOn\": false\n },\n \ + ,\n \"net.*\"\n ],\n \"failSwapOn\": false,\n \"containerLogMaxFiles\": + 10,\n \"containerLogMaxSizeMb\": 20\n },\n \ \ \"linuxOSConfig\": {\n \"sysctls\": {\n \"netCoreSomaxconn\"\ : 163849,\n \"netIpv4TcpTwReuse\": true,\n \"netIpv4IpLocalPortRange\"\ : \"32000 60000\"\n },\n \"transparentHugePageEnabled\": \"madvise\"\ @@ -922,9 +925,10 @@ interactions: [], "kubeletConfig": {"cpuManagerPolicy": "static", "cpuCfsQuota": true, "cpuCfsQuotaPeriod": "200ms", "imageGcHighThreshold": 90, "imageGcLowThreshold": 70, "topologyManagerPolicy": "best-effort", "allowedUnsafeSysctls": ["kernel.msg*", "net.*"], "failSwapOn": - false}, "linuxOSConfig": {"sysctls": {"netCoreSomaxconn": 163849, "netIpv4TcpTwReuse": - true, "netIpv4IpLocalPortRange": "32000 60000"}, "transparentHugePageEnabled": - "madvise", "transparentHugePageDefrag": "defer+madvise", "swapFileSizeMB": 1500}}}' + false, "containerLogMaxFiles": 10, "containerLogMaxSizeMb": 20}, "linuxOSConfig": + {"sysctls": {"netCoreSomaxconn": 163849, "netIpv4TcpTwReuse": true, "netIpv4IpLocalPortRange": + "32000 60000"}, "transparentHugePageEnabled": "madvise", "transparentHugePageDefrag": + "defer+madvise", "swapFileSizeMB": 1500}}}' headers: AKSHTTPCustomFeatures: - Microsoft.ContainerService/CustomNodeConfigPreview @@ -963,7 +967,8 @@ interactions: : \"static\",\n \"cpuCfsQuota\": true,\n \"cpuCfsQuotaPeriod\": \"200ms\"\ ,\n \"imageGcHighThreshold\": 90,\n \"imageGcLowThreshold\": 70,\n \ \ \"topologyManagerPolicy\": \"best-effort\",\n \"allowedUnsafeSysctls\"\ - : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\": false\n\ + : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\": false,\n + \"containerLogMaxFiles\": 10,\n \"containerLogMaxSizeMb\": 20\n\ \ },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \"netCoreSomaxconn\"\ : 163849,\n \"netIpv4TcpTwReuse\": true,\n \"netIpv4IpLocalPortRange\"\ : \"32000 60000\"\n },\n \"transparentHugePageEnabled\": \"madvise\"\ @@ -1862,7 +1867,8 @@ interactions: : \"static\",\n \"cpuCfsQuota\": true,\n \"cpuCfsQuotaPeriod\": \"200ms\"\ ,\n \"imageGcHighThreshold\": 90,\n \"imageGcLowThreshold\": 70,\n \ \ \"topologyManagerPolicy\": \"best-effort\",\n \"allowedUnsafeSysctls\"\ - : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\": false\n\ + : [\n \"kernel.msg*\",\n \"net.*\"\n ],\n \"failSwapOn\": false + ,\n \"containerLogMaxFiles\": 10,\n \"containerLogMaxSizeMb\": 20\n\ \ },\n \"linuxOSConfig\": {\n \"sysctls\": {\n \"netCoreSomaxconn\"\ : 163849,\n \"netIpv4TcpTwReuse\": true,\n \"netIpv4IpLocalPortRange\"\ : \"32000 60000\"\n },\n \"transparentHugePageEnabled\": \"madvise\"\ diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 65fad37577a..372e8361295 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.17" +VERSION = "0.5.18" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 6f22da9df962efd5a2f80262d9b283fafbb664a3 Mon Sep 17 00:00:00 2001 From: kai ru <69238381+kairu-ms@users.noreply.github.com> Date: Thu, 10 Jun 2021 10:42:09 +0800 Subject: [PATCH 17/37] [AMCS] GA Release (#3438) * regenerate amcs by codegen * regenerate by latest swagger and transfer-period are removed * add endpoints for data-collection --- src/monitor-control-service/README.md | 27 + .../azext_amcs/__init__.py | 21 +- .../azext_amcs/_help.py | 20 + .../azext_amcs/action.py | 7 +- .../azext_amcs/azext_metadata.json | 1 - .../azext_amcs/custom.py | 7 +- .../azext_amcs/generated/_client_factory.py | 4 + .../azext_amcs/generated/_help.py | 43 + .../azext_amcs/generated/_params.py | 27 +- .../azext_amcs/generated/action.py | 1 - .../azext_amcs/generated/commands.py | 68 +- .../azext_amcs/generated/custom.py | 21 + .../azext_amcs/manual/_help.py | 91 +- .../azext_amcs/manual/_params.py | 26 +- .../azext_amcs/manual/action.py | 4 - .../azext_amcs/manual/commands.py | 30 +- .../azext_amcs/manual/custom.py | 56 +- .../azext_amcs/tests/__init__.py | 114 -- .../azext_amcs/tests/latest/example_steps.py | 123 -- .../test_amcs_data_collection_endpoint.yaml | 506 +++++ ...test_monitor_control_service_Scenario.yaml | 1769 +++++++---------- .../test_monitor_control_service_scenario.py | 182 +- ...nitor_control_service_scenario_coverage.md | 36 - .../azext_amcs/vendored_sdks/amcs/__init__.py | 3 + .../vendored_sdks/amcs/_configuration.py | 7 +- .../vendored_sdks/amcs/_monitor_client.py | 9 +- .../azext_amcs/vendored_sdks/amcs/_version.py | 9 + .../vendored_sdks/amcs/aio/__init__.py | 10 + .../vendored_sdks/amcs/aio/_configuration.py | 67 + .../vendored_sdks/amcs/aio/_monitor_client.py | 73 + .../amcs/aio/operations/__init__.py | 17 + .../_data_collection_endpoints_operations.py | 455 +++++ ...collection_rule_associations_operations.py | 384 ++++ .../_data_collection_rules_operations.py | 455 +++++ .../vendored_sdks/amcs/models/__init__.py | 74 +- .../vendored_sdks/amcs/models/_models.py | 1043 ++++++---- .../vendored_sdks/amcs/models/_models_py3.py | 1121 +++++++---- .../amcs/models/_monitor_client_enums.py | 95 +- .../vendored_sdks/amcs/operations/__init__.py | 2 + .../_data_collection_endpoints_operations.py | 465 +++++ ...collection_rule_associations_operations.py | 36 +- .../_data_collection_rules_operations.py | 48 +- .../azext_amcs/vendored_sdks/amcs/setup.py | 37 + src/monitor-control-service/report.md | 61 +- 44 files changed, 5326 insertions(+), 2329 deletions(-) create mode 100644 src/monitor-control-service/azext_amcs/_help.py delete mode 100644 src/monitor-control-service/azext_amcs/tests/__init__.py delete mode 100644 src/monitor-control-service/azext_amcs/tests/latest/example_steps.py create mode 100644 src/monitor-control-service/azext_amcs/tests/latest/recordings/test_amcs_data_collection_endpoint.yaml delete mode 100644 src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario_coverage.md create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_version.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/__init__.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_configuration.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_monitor_client.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/__init__.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_endpoints_operations.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rule_associations_operations.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rules_operations.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_endpoints_operations.py create mode 100644 src/monitor-control-service/azext_amcs/vendored_sdks/amcs/setup.py diff --git a/src/monitor-control-service/README.md b/src/monitor-control-service/README.md index ae06ad18062..4174bddde64 100644 --- a/src/monitor-control-service/README.md +++ b/src/monitor-control-service/README.md @@ -159,3 +159,30 @@ az monitor data-collection rule association list --resource "subscriptions/70336 ``` az monitor data-collection rule association delete --name "myAssociation" --resource "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm" ``` + +#### data-collection endpoint +##### Create +``` +az monitor data-collection endpoint create --name "myEndpoint" -g "myResourceGroup" -l "eastus2euap" --public-network-access "enabled" +``` +##### Show +``` +az monitor data-collection endpoint show --name "myEndpoint" -g "myResourceGroup" +``` +##### Update +``` +az monitor data-collection endpoint update --name "myEndpoint" -g "myResourceGroup" --kind windows +``` +##### List +List endpoints for specified resource group +``` +az monitor data-collection endpoint list -g "myResourceGroup" +``` +List endpoints for subscription +``` +az monitor data-collection endpoint list +``` +##### Delete +``` +az monitor data-collection endpoint delete --name "myEndpoint" -g "myResourceGroup" +``` diff --git a/src/monitor-control-service/azext_amcs/__init__.py b/src/monitor-control-service/azext_amcs/__init__.py index af0cf41cc90..2593fd51f95 100644 --- a/src/monitor-control-service/azext_amcs/__init__.py +++ b/src/monitor-control-service/azext_amcs/__init__.py @@ -7,13 +7,10 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- +# pylint: disable=unused-import +import azext_amcs._help from azure.cli.core import AzCommandsLoader -from azext_amcs.generated._help import helps # pylint: disable=unused-import -try: - from azext_amcs.manual._help import helps # pylint: disable=reimported -except ImportError: - pass class MonitorClientCommandsLoader(AzCommandsLoader): @@ -33,8 +30,11 @@ def load_command_table(self, args): try: from azext_amcs.manual.commands import load_command_table as load_command_table_manual load_command_table_manual(self, args) - except ImportError: - pass + except ImportError as e: + if e.name.endswith('manual.commands'): + pass + else: + raise e return self.command_table def load_arguments(self, command): @@ -43,8 +43,11 @@ def load_arguments(self, command): try: from azext_amcs.manual._params import load_arguments as load_arguments_manual load_arguments_manual(self, command) - except ImportError: - pass + except ImportError as e: + if e.name.endswith('manual._params'): + pass + else: + raise e COMMAND_LOADER_CLS = MonitorClientCommandsLoader diff --git a/src/monitor-control-service/azext_amcs/_help.py b/src/monitor-control-service/azext_amcs/_help.py new file mode 100644 index 00000000000..9b93f87a6e9 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/_help.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import +# pylint: disable=unused-import +from .generated._help import helps # pylint: disable=reimported +try: + from .manual._help import helps # pylint: disable=reimported +except ImportError as e: + if e.name.endswith('manual._help'): + pass + else: + raise e diff --git a/src/monitor-control-service/azext_amcs/action.py b/src/monitor-control-service/azext_amcs/action.py index d95d53bf711..9b3d0a8a78c 100644 --- a/src/monitor-control-service/azext_amcs/action.py +++ b/src/monitor-control-service/azext_amcs/action.py @@ -13,5 +13,8 @@ from .generated.action import * # noqa: F403 try: from .manual.action import * # noqa: F403 -except ImportError: - pass +except ImportError as e: + if e.name.endswith('manual.action'): + pass + else: + raise e diff --git a/src/monitor-control-service/azext_amcs/azext_metadata.json b/src/monitor-control-service/azext_amcs/azext_metadata.json index 30fdaf614ee..3695b0d7077 100644 --- a/src/monitor-control-service/azext_amcs/azext_metadata.json +++ b/src/monitor-control-service/azext_amcs/azext_metadata.json @@ -1,4 +1,3 @@ { - "azext.isPreview": true, "azext.minCliCoreVersion": "2.15.0" } \ No newline at end of file diff --git a/src/monitor-control-service/azext_amcs/custom.py b/src/monitor-control-service/azext_amcs/custom.py index dbe9d5f9742..885447229d6 100644 --- a/src/monitor-control-service/azext_amcs/custom.py +++ b/src/monitor-control-service/azext_amcs/custom.py @@ -13,5 +13,8 @@ from .generated.custom import * # noqa: F403 try: from .manual.custom import * # noqa: F403 -except ImportError: - pass +except ImportError as e: + if e.name.endswith('manual.custom'): + pass + else: + raise e diff --git a/src/monitor-control-service/azext_amcs/generated/_client_factory.py b/src/monitor-control-service/azext_amcs/generated/_client_factory.py index 8886ffe1aac..f085d87433c 100644 --- a/src/monitor-control-service/azext_amcs/generated/_client_factory.py +++ b/src/monitor-control-service/azext_amcs/generated/_client_factory.py @@ -16,6 +16,10 @@ def cf_monitor_control_service_cl(cli_ctx, *_): MonitorClient) +def cf_data_collection_endpoint(cli_ctx, *_): + return cf_monitor_control_service_cl(cli_ctx).data_collection_endpoints + + def cf_data_collection_rule_association(cli_ctx, *_): return cf_monitor_control_service_cl(cli_ctx).data_collection_rule_associations diff --git a/src/monitor-control-service/azext_amcs/generated/_help.py b/src/monitor-control-service/azext_amcs/generated/_help.py index 35938f8619e..67a2cfa3fe0 100644 --- a/src/monitor-control-service/azext_amcs/generated/_help.py +++ b/src/monitor-control-service/azext_amcs/generated/_help.py @@ -12,6 +12,49 @@ from knack.help_files import helps +helps['monitor data-collection'] = ''' + type: group + short-summary: Manage Monitor +''' + +helps['monitor data-collection endpoint'] = """ + type: group + short-summary: Manage data collection endpoint with monitor control service +""" + +helps['monitor data-collection endpoint list'] = """ + type: command + short-summary: "Lists all data collection endpoints in the specified resource group. And Lists all data collection \ +endpoints in the specified subscription." + examples: + - name: List data collection endpoints by resource group + text: |- + az monitor data-collection endpoint list --resource-group "myResourceGroup" + - name: List data collection endpoints by subscription + text: |- + az monitor data-collection endpoint list +""" + +helps['monitor data-collection endpoint show'] = """ + type: command + short-summary: "Returns the specified data collection endpoint." + examples: + - name: Get data collection endpoint + text: |- + az monitor data-collection endpoint show --name "myCollectionEndpoint" --resource-group \ +"myResourceGroup" +""" + +helps['monitor data-collection endpoint delete'] = """ + type: command + short-summary: "Deletes a data collection endpoint." + examples: + - name: Delete data collection endpoint + text: |- + az monitor data-collection endpoint delete --name "myCollectionEndpoint" --resource-group \ +"myResourceGroup" +""" + helps['monitor data-collection rule association'] = """ type: group short-summary: Manage data collection rule association with monitor control service diff --git a/src/monitor-control-service/azext_amcs/generated/_params.py b/src/monitor-control-service/azext_amcs/generated/_params.py index 2d90b23807e..b488183f5ca 100644 --- a/src/monitor-control-service/azext_amcs/generated/_params.py +++ b/src/monitor-control-service/azext_amcs/generated/_params.py @@ -15,6 +15,19 @@ def load_arguments(self, _): + with self.argument_context('monitor data-collection endpoint list') as c: + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('monitor data-collection endpoint show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('data_collection_endpoint_name', options_list=['--name', '-n'], type=str, help='The name of the ' + 'data collection endpoint. The name is case insensitive.', id_part='name') + + with self.argument_context('monitor data-collection endpoint delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('data_collection_endpoint_name', options_list=['--name', '-n'], type=str, help='The name of the ' + 'data collection endpoint. The name is case insensitive.', id_part='name') + with self.argument_context('monitor data-collection rule association list') as c: c.argument('resource_group_name', resource_group_name_type) c.argument('data_collection_rule_name', options_list=['--rule-name'], type=str, help='The name of the data ' @@ -23,21 +36,23 @@ def load_arguments(self, _): with self.argument_context('monitor data-collection rule association show') as c: c.argument('resource_uri', options_list=['--resource'], type=str, help='The identifier of the resource.') - c.argument('association_name', options_list=['--name', '-n'], type=str, help='The name of the association.') + c.argument('association_name', options_list=['--name', '-n'], type=str, help='The name of the association. The ' + 'name is case insensitive.') with self.argument_context('monitor data-collection rule association delete') as c: c.argument('resource_uri', options_list=['--resource'], type=str, help='The identifier of the resource.') - c.argument('association_name', options_list=['--name', '-n'], type=str, help='The name of the association.') + c.argument('association_name', options_list=['--name', '-n'], type=str, help='The name of the association. The ' + 'name is case insensitive.') with self.argument_context('monitor data-collection rule list') as c: c.argument('resource_group_name', resource_group_name_type) with self.argument_context('monitor data-collection rule show') as c: c.argument('resource_group_name', resource_group_name_type) - c.argument('data_collection_rule_name', options_list=['--name', '-n'], type=str, - help='The name of the data collection rule. The name is case insensitive.', id_part='name') + c.argument('data_collection_rule_name', options_list=['--name', '-n'], type=str, help='The name of the data ' + 'collection rule. The name is case insensitive.', id_part='name') with self.argument_context('monitor data-collection rule delete') as c: c.argument('resource_group_name', resource_group_name_type) - c.argument('data_collection_rule_name', options_list=['--name', '-n'], type=str, - help='The name of the data collection rule. The name is case insensitive.', id_part='name') + c.argument('data_collection_rule_name', options_list=['--name', '-n'], type=str, help='The name of the data ' + 'collection rule. The name is case insensitive.', id_part='name') diff --git a/src/monitor-control-service/azext_amcs/generated/action.py b/src/monitor-control-service/azext_amcs/generated/action.py index b49bfaeeefe..b33a44c1ebf 100644 --- a/src/monitor-control-service/azext_amcs/generated/action.py +++ b/src/monitor-control-service/azext_amcs/generated/action.py @@ -7,4 +7,3 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -# pylint: disable=protected-access diff --git a/src/monitor-control-service/azext_amcs/generated/commands.py b/src/monitor-control-service/azext_amcs/generated/commands.py index f490759122e..d70d613ba46 100644 --- a/src/monitor-control-service/azext_amcs/generated/commands.py +++ b/src/monitor-control-service/azext_amcs/generated/commands.py @@ -9,34 +9,62 @@ # -------------------------------------------------------------------------- # pylint: disable=too-many-statements # pylint: disable=too-many-locals +# pylint: disable=bad-continuation +# pylint: disable=line-too-long from azure.cli.core.commands import CliCommandType +from azext_amcs.generated._client_factory import ( + cf_data_collection_endpoint, + cf_data_collection_rule_association, + cf_data_collection_rule, +) + + +monitor_control_service_data_collection_endpoint = CliCommandType( + operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_endpoints_operations#DataCollectionEndpointsOperations.{}', + client_factory=cf_data_collection_endpoint, +) + + +monitor_control_service_data_collection_rule = CliCommandType( + operations_tmpl=( + 'azext_amcs.vendored_sdks.amcs.operations._data_collection_rules_operations#DataCollectionRulesOperations.{}' + ), + client_factory=cf_data_collection_rule, +) + + +monitor_control_service_data_collection_rule_association = CliCommandType( + operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rule_associations_operations#DataCollectionRuleAssociationsOperations.{}', + client_factory=cf_data_collection_rule_association, +) def load_command_table(self, _): - from azext_amcs.generated._client_factory import cf_data_collection_rule_association - monitor_control_service_data_collection_rule_association = CliCommandType( - operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rule_associations_operations#DataCol' - 'lectionRuleAssociationsOperations.{}', - client_factory=cf_data_collection_rule_association) - with self.command_group('monitor data-collection rule association', - monitor_control_service_data_collection_rule_association, - client_factory=cf_data_collection_rule_association) as g: - g.custom_command('list', 'monitor_data_collection_rule_association_list') - g.custom_show_command('show', 'monitor_data_collection_rule_association_show') - g.custom_command('delete', 'monitor_data_collection_rule_association_delete', confirmation=True) + with self.command_group( + 'monitor data-collection endpoint', + monitor_control_service_data_collection_endpoint, + client_factory=cf_data_collection_endpoint, + ) as g: + g.custom_command('list', 'monitor_data_collection_endpoint_list') + g.custom_show_command('show', 'monitor_data_collection_endpoint_show') + g.custom_command('delete', 'monitor_data_collection_endpoint_delete', confirmation=True) - from azext_amcs.generated._client_factory import cf_data_collection_rule - monitor_control_service_data_collection_rule = CliCommandType( - operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rules_operations#DataCollectionRules' - 'Operations.{}', - client_factory=cf_data_collection_rule) - with self.command_group('monitor data-collection rule', monitor_control_service_data_collection_rule, - client_factory=cf_data_collection_rule) as g: + with self.command_group( + 'monitor data-collection rule', + monitor_control_service_data_collection_rule, + client_factory=cf_data_collection_rule, + ) as g: g.custom_command('list', 'monitor_data_collection_rule_list') g.custom_show_command('show', 'monitor_data_collection_rule_show') g.custom_command('delete', 'monitor_data_collection_rule_delete', confirmation=True) - with self.command_group('monitor-control-service', is_preview=True): - pass + with self.command_group( + 'monitor data-collection rule association', + monitor_control_service_data_collection_rule_association, + client_factory=cf_data_collection_rule_association, + ) as g: + g.custom_command('list', 'monitor_data_collection_rule_association_list') + g.custom_show_command('show', 'monitor_data_collection_rule_association_show') + g.custom_command('delete', 'monitor_data_collection_rule_association_delete', confirmation=True) diff --git a/src/monitor-control-service/azext_amcs/generated/custom.py b/src/monitor-control-service/azext_amcs/generated/custom.py index db07c469953..7b3e048c9ef 100644 --- a/src/monitor-control-service/azext_amcs/generated/custom.py +++ b/src/monitor-control-service/azext_amcs/generated/custom.py @@ -10,6 +10,27 @@ # pylint: disable=too-many-lines +def monitor_data_collection_endpoint_list(client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def monitor_data_collection_endpoint_show(client, + resource_group_name, + data_collection_endpoint_name): + return client.get(resource_group_name=resource_group_name, + data_collection_endpoint_name=data_collection_endpoint_name) + + +def monitor_data_collection_endpoint_delete(client, + resource_group_name, + data_collection_endpoint_name): + return client.delete(resource_group_name=resource_group_name, + data_collection_endpoint_name=data_collection_endpoint_name) + + def monitor_data_collection_rule_association_list(client, resource_group_name=None, data_collection_rule_name=None, diff --git a/src/monitor-control-service/azext_amcs/manual/_help.py b/src/monitor-control-service/azext_amcs/manual/_help.py index 00516e1d68d..4208b3505e1 100644 --- a/src/monitor-control-service/azext_amcs/manual/_help.py +++ b/src/monitor-control-service/azext_amcs/manual/_help.py @@ -11,6 +11,63 @@ short-summary: Manage data collection for monitor control service """ +helps['monitor data-collection endpoint'] = """ + type: group + short-summary: Manage data collection endpoint for monitor control service +""" + +helps['monitor data-collection endpoint list'] = """ + type: command + short-summary: "List all data collection endpoints." + examples: + - name: List data collection endpoints by resource group + text: |- + az monitor data-collection endpoint list --resource-group "myResourceGroup" + - name: List data collection endpoints by subscription + text: |- + az monitor data-collection endpoint list +""" + +helps['monitor data-collection endpoint show'] = """ + type: command + short-summary: "Show the specified data collection endpoint." + examples: + - name: Get data collection endpoint + text: |- + az monitor data-collection endpoint show --name "myCollectionEndpoint" --resource-group \ +"myResourceGroup" +""" + +helps['monitor data-collection endpoint create'] = """ + type: command + short-summary: "Create a data collection endpoint." + examples: + - name: Create data collection endpoint + text: |- + az monitor data-collection endpoint create -g "myResourceGroup" -l "eastus2euap" \ + --name "myCollectionEndpoint" --public-network-access "Enabled" +""" + +helps['monitor data-collection endpoint update'] = """ + type: command + short-summary: "Update a data collection endpoint." + examples: + - name: Update data collection endpoint + text: |- + az monitor data-collection endpoint update --tags tag1="A" tag2="B" tag3="C" --name \ +"myCollectionEndpoint" --resource-group "myResourceGroup" +""" + +helps['monitor data-collection endpoint delete'] = """ + type: command + short-summary: "Delete a data collection endpoint." + examples: + - name: Delete data collection endpoint + text: |- + az monitor data-collection endpoint delete --name "myCollectionEndpoint" --resource-group \ +"myResourceGroup" +""" + helps['monitor data-collection rule association'] = """ type: group short-summary: Manage data collection rule association for monitor control service @@ -137,13 +194,11 @@ - name: --performance-counters short-summary: "The list of performance counter data source configurations." long-summary: | - Usage: --performance-counters streams=XX1 streams=XX2 transfer-period=XX \ + Usage: --performance-counters streams=XX1 streams=XX2 \ sampling-frequency=XX counter-specifiers=XX1 counter-specifiers=XX2 name=XX streams: Required. List of streams that this data source will be sent to. A stream indicates what schema \ will be used for this data and usually what table in Log Analytics the data will be sent to. - transfer-period: Required. The interval between data uploads (scheduled transfers), rounded up \ -to the nearest minute. sampling-frequency: Required. The number of seconds between consecutive counter measurements \ (samples). counter-specifiers: Required. A list of specifier names of the performance counters you want to collect. \ @@ -156,13 +211,11 @@ - name: --windows-event-logs short-summary: "The list of Windows Event Log data source configurations." long-summary: | - Usage: --windows-event-logs streams=XX1 streams=XX2 transfer-period=XX x-path-queries=XX1 \ + Usage: --windows-event-logs streams=XX1 streams=XX2 x-path-queries=XX1 \ x-path-queries=XX2 name=XX streams: Required. List of streams that this data source will be sent to. A stream indicates what schema \ will be used for this data and usually what table in Log Analytics the data will be sent to. - transfer-period: Required. The interval between data uploads (scheduled transfers), rounded up \ -to the nearest minute. x-path-queries: Required. A list of Windows Event Log queries in XPATH format. name: Required. A friendly name for the data source. This name should be unique across all data sources \ (regardless of type) within the data collection rule. @@ -195,17 +248,17 @@ --performance-counters name="cloudTeamCoreCounters" counter-specifiers="\\\\Processor(_Total)\\\\% Processor Time" \ counter-specifiers="\\\\Memory\\\\Committed Bytes" counter-specifiers="\\\\LogicalDisk(_Total)\\\\Free Megabytes" \ counter-specifiers="\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" sampling-frequency=15 \ -transfer-period="PT1M" streams="Microsoft-Perf" \ +streams="Microsoft-Perf" \ --performance-counters name="appTeamExtraCounters" \ counter-specifiers="\\\\Process(_Total)\\\\Thread Count" sampling-frequency=30 \ -transfer-period="PT5M" streams="Microsoft-Perf" \ +streams="Microsoft-Perf" \ --syslog name="cronSyslog" facility-names="cron" log-levels="Debug" log-levels="Critical" log-levels="Emergency" \ streams="Microsoft-Syslog" \ --syslog name="syslogBase" facility-names="syslog" log-levels="Alert" log-levels="Critical" log-levels="Emergency" \ streams="Microsoft-Syslog" \ ---windows-event-logs name="cloudSecurityTeamEvents" transfer-period="PT1M" streams="Microsoft-WindowsEvent" \ +--windows-event-logs name="cloudSecurityTeamEvents" streams="Microsoft-WindowsEvent" \ x-path-queries="Security!" \ ---windows-event-logs name="appTeam1AppEvents" transfer-period="PT5M" streams="Microsoft-WindowsEvent" \ +--windows-event-logs name="appTeam1AppEvents" streams="Microsoft-WindowsEvent" \ x-path-queries="System![System[(Level = 1 or Level = 2 or Level = 3)]]" \ x-path-queries="Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" @@ -244,13 +297,11 @@ - name: --performance-counters short-summary: "The list of performance counter data source configurations." long-summary: | - Usage: --performance-counters streams=XX1 streams=XX2 transfer-period=XX \ + Usage: --performance-counters streams=XX1 streams=XX2 \ sampling-frequency=XX counter-specifiers=XX1 counter-specifiers=XX2 name=XX streams: Required. List of streams that this data source will be sent to. A stream indicates what schema \ will be used for this data and usually what table in Log Analytics the data will be sent to. - transfer-period: Required. The interval between data uploads (scheduled transfers), rounded up \ -to the nearest minute. sampling-frequency: Required. The number of seconds between consecutive counter measurements \ (samples). counter-specifiers: Required. A list of specifier names of the performance counters you want to collect. \ @@ -263,13 +314,11 @@ - name: --windows-event-logs short-summary: "The list of Windows Event Log data source configurations." long-summary: | - Usage: --windows-event-logs streams=XX1 streams=XX2 transfer-period=XX x-path-queries=XX1 \ + Usage: --windows-event-logs streams=XX1 streams=XX2 x-path-queries=XX1 \ x-path-queries=XX2 name=XX streams: Required. List of streams that this data source will be sent to. A stream indicates what schema \ will be used for this data and usually what table in Log Analytics the data will be sent to. - transfer-period: Required. The interval between data uploads (scheduled transfers), rounded up \ -to the nearest minute. x-path-queries: Required. A list of Windows Event Log queries in XPATH format. name: Required. A friendly name for the data source. This name should be unique across all data sources \ (regardless of type) within the data collection rule. @@ -300,10 +349,10 @@ rosoft.OperationalInsights/workspaces/centralTeamWorkspace" \ --performance-counters name="appTeamExtraCounters" \ counter-specifiers="\\\\Process(_Total)\\\\Thread Count" sampling-frequency=30 \ -transfer-period="PT5M" streams="Microsoft-Perf" \ +streams="Microsoft-Perf" \ --syslog name="cronSyslog" facility-names="cron" log-levels="Debug" log-levels="Critical" log-levels="Emergency" \ streams="Microsoft-Syslog" \ ---windows-event-logs name="cloudSecurityTeamEvents" transfer-period="PT1M" streams="Microsoft-WindowsEvent" \ +--windows-event-logs name="cloudSecurityTeamEvents" streams="Microsoft-WindowsEvent" \ x-path-queries="Security!" """ @@ -432,7 +481,7 @@ az monitor data-collection rule performance-counter add --rule-name "myCollectionRule" \ --resource-group "myResourceGroup" --name "team2ExtraCounters" --streams "Microsoft-Perf" \ --counter-specifiers "\\\\Process(_Total)\\\\Thread Count" "\\\\LogicalDisk(_Total)\\\\Free Megabytes" \ ---sampling-frequency 30 --transfer-period PT15M +--sampling-frequency 30 """ helps['monitor data-collection rule performance-counter update'] = """ @@ -442,7 +491,7 @@ - name: Update a Log performance counter data source text: |- az monitor data-collection rule performance-counter update --rule-name "myCollectionRule" \ ---resource-group "myResourceGroup" --name "team2ExtraCounters" --transfer-period PT1M +--resource-group "myResourceGroup" --name "team2ExtraCounters" """ helps['monitor data-collection rule performance-counter delete'] = """ @@ -487,7 +536,7 @@ - name: Add a Windows Event Log data source text: |- az monitor data-collection rule windows-event-log add --rule-name "myCollectionRule" \ ---resource-group "myResourceGroup" --name "appTeam1AppEvents" --transfer-period "PT1M" \ +--resource-group "myResourceGroup" --name "appTeam1AppEvents" \ --streams "Microsoft-WindowsEvent" --x-path-queries "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" \ "System![System[(Level = 1 or Level = 2 or Level = 3)]]" """ diff --git a/src/monitor-control-service/azext_amcs/manual/_params.py b/src/monitor-control-service/azext_amcs/manual/_params.py index 026c6aa1880..0f4d09fe28f 100644 --- a/src/monitor-control-service/azext_amcs/manual/_params.py +++ b/src/monitor-control-service/azext_amcs/manual/_params.py @@ -27,13 +27,29 @@ from azext_amcs.vendored_sdks.amcs.models import KnownDataFlowStreams, KnownPerfCounterDataSourceStreams, \ - KnownPerfCounterDataSourceScheduledTransferPeriod, KnownWindowsEventLogDataSourceStreams, \ - KnownWindowsEventLogDataSourceScheduledTransferPeriod, KnownSyslogDataSourceStreams, \ + KnownWindowsEventLogDataSourceStreams, KnownSyslogDataSourceStreams, \ KnownSyslogDataSourceFacilityNames, KnownSyslogDataSourceLogLevels def load_arguments(self, _): + with self.argument_context('monitor data-collection endpoint') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('data_collection_endpoint_name', options_list=['--name', '-n'], type=str, + help='The name of the data collection endpoint. The name is case insensitive.', id_part='name') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + c.argument('kind', arg_type=get_enum_type(['Linux', 'Windows']), help='The kind of the resource.') + c.argument('description', type=str, help='Description of the data collection endpoint.') + c.argument('public_network_access', arg_type=get_enum_type(['Enabled', 'Disabled']), + help='The configuration to set whether network access from public internet to the endpoints ' + 'are allowed.', + arg_group='Network Acls') + + with self.argument_context('monitor data-collection endpoint create') as c: + c.argument('data_collection_endpoint_name', id_part=None) + with self.argument_context('monitor data-collection rule association') as c: c.argument('resource_uri', options_list=['--resource'], help='The identifier of the resource.') c.argument('association_name', options_list=['--name', '-n'], help='The name of the association.') @@ -109,9 +125,6 @@ def load_arguments(self, _): nargs='+', help='List of streams that this data source will be sent to. A stream ' 'indicates what schema will be used for this data and usually what table in Log Analytics the data ' 'will be sent to.') - c.argument('scheduled_transfer_period', options_list=['--transfer-period'], - arg_type=get_enum_type(KnownPerfCounterDataSourceScheduledTransferPeriod), - help='The interval between data uploads (scheduled transfers), rounded up to the nearest minute.') c.argument('sampling_frequency_in_seconds', options_list=['--sampling-frequency'], type=int, help='The number of seconds between consecutive counter measurements (samples).') c.argument('counter_specifiers', options_list=['--counter-specifiers'], nargs='+', @@ -131,9 +144,6 @@ def load_arguments(self, _): nargs='+', help='List of streams that this data source will be sent to. A stream ' 'indicates what schema will be used for this data and usually what table in Log Analytics the data ' 'will be sent to.') - c.argument('scheduled_transfer_period', options_list=['--transfer-period'], - arg_type=get_enum_type(KnownWindowsEventLogDataSourceScheduledTransferPeriod), - help='The interval between data uploads (scheduled transfers), rounded up to the nearest minute.') c.argument('x_path_queries', options_list=['--x-path-queries'], nargs='+', help='A list of Windows Event Log queries in XPATH format.') diff --git a/src/monitor-control-service/azext_amcs/manual/action.py b/src/monitor-control-service/azext_amcs/manual/action.py index f4c857ce456..31aa6ac57e7 100644 --- a/src/monitor-control-service/azext_amcs/manual/action.py +++ b/src/monitor-control-service/azext_amcs/manual/action.py @@ -99,8 +99,6 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use v = properties[k] if kl == 'streams': d['streams'] = v - elif kl == 'transfer-period': - d['scheduled_transfer_period'] = v[0] elif kl == 'sampling-frequency': try: d['sampling_frequency_in_seconds'] = int(v[0]) @@ -132,8 +130,6 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use v = properties[k] if kl == 'streams': d['streams'] = v - elif kl == 'transfer-period': - d['scheduled_transfer_period'] = v[0] elif kl == 'x-path-queries': d['x_path_queries'] = v elif kl == 'name': diff --git a/src/monitor-control-service/azext_amcs/manual/commands.py b/src/monitor-control-service/azext_amcs/manual/commands.py index e838142e079..efc0f6bc609 100644 --- a/src/monitor-control-service/azext_amcs/manual/commands.py +++ b/src/monitor-control-service/azext_amcs/manual/commands.py @@ -9,25 +9,37 @@ def load_command_table(self, _): - with self.command_group('monitor data-collection', is_experimental=True): - pass - - from azext_amcs.generated._client_factory import cf_data_collection_rule_association + from azext_amcs.generated._client_factory import cf_data_collection_rule_association, cf_data_collection_rule,\ + cf_data_collection_endpoint monitor_control_service_data_collection_rule_association = CliCommandType( operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rule_associations_operations#DataCol' 'lectionRuleAssociationsOperations.{}', client_factory=cf_data_collection_rule_association) + monitor_control_service_data_collection_rule = CliCommandType( + operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rules_operations#DataCollectionRules' + 'Operations.{}', + client_factory=cf_data_collection_rule) + monitor_control_service_data_collection_endpoint = CliCommandType( + operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_endpoints_operations#DataCollectionE' + 'ndpointsOperations.{}', + client_factory=cf_data_collection_endpoint, + ) + + with self.command_group('monitor data-collection'): + pass + + with self.command_group('monitor data-collection endpoint', + monitor_control_service_data_collection_endpoint, + client_factory=cf_data_collection_endpoint) as g: + g.custom_command('create', 'data_collection_endpoint_create') + g.custom_command('update', 'data_collection_endpoint_update') + with self.command_group('monitor data-collection rule association', monitor_control_service_data_collection_rule_association, client_factory=cf_data_collection_rule_association) as g: g.custom_command('create', 'data_collection_rule_associations_create') g.custom_command('update', 'data_collection_rule_associations_update') - from azext_amcs.generated._client_factory import cf_data_collection_rule - monitor_control_service_data_collection_rule = CliCommandType( - operations_tmpl='azext_amcs.vendored_sdks.amcs.operations._data_collection_rules_operations#DataCollectionRules' - 'Operations.{}', - client_factory=cf_data_collection_rule) with self.command_group('monitor data-collection rule', monitor_control_service_data_collection_rule, client_factory=cf_data_collection_rule) as g: g.custom_command( diff --git a/src/monitor-control-service/azext_amcs/manual/custom.py b/src/monitor-control-service/azext_amcs/manual/custom.py index f77fb0c3935..cc6da9bf7c1 100644 --- a/src/monitor-control-service/azext_amcs/manual/custom.py +++ b/src/monitor-control-service/azext_amcs/manual/custom.py @@ -5,6 +5,52 @@ # -------------------------------------------------------------------------------------------- +def data_collection_endpoint_create(client, + resource_group_name, + data_collection_endpoint_name, + location, + public_network_access, + tags=None, + kind=None, + description=None): + body = {} + body['location'] = location + body['tags'] = tags + body['kind'] = kind + body['description'] = description + body['network_acls'] = {} + body['network_acls']['public_network_access'] = public_network_access + return client.create(resource_group_name=resource_group_name, + data_collection_endpoint_name=data_collection_endpoint_name, + body=body) + + +def data_collection_endpoint_update(client, + resource_group_name, + data_collection_endpoint_name, + tags=None, + kind=None, + description=None, + public_network_access=None): + from ..custom import monitor_data_collection_endpoint_show + instance = monitor_data_collection_endpoint_show(client, resource_group_name=resource_group_name, + data_collection_endpoint_name=data_collection_endpoint_name) + body = instance.as_dict(keep_readonly=False) + + if description is not None: + body['description'] = description + if tags is not None: + body['tags'] = tags + if kind is not None: + body['kind'] = kind + if public_network_access is not None: + body['network_acls'] = {} + body['network_acls']['public_network_access'] = public_network_access + return client.create(resource_group_name=resource_group_name, + data_collection_endpoint_name=data_collection_endpoint_name, + body=body) + + def data_collection_rule_associations_create(client, resource_uri, association_name, @@ -296,7 +342,6 @@ def data_collection_rules_performance_counters_add(client, data_collection_rule_name, name, streams, - scheduled_transfer_period, sampling_frequency_in_seconds, counter_specifiers): from ..custom import monitor_data_collection_rule_show @@ -316,7 +361,6 @@ def data_collection_rules_performance_counters_add(client, item = { 'name': name, 'streams': streams, - 'scheduled_transfer_period': scheduled_transfer_period, 'sampling_frequency_in_seconds': sampling_frequency_in_seconds, 'counter_specifiers': counter_specifiers } @@ -356,7 +400,6 @@ def data_collection_rules_performance_counters_update(client, data_collection_rule_name, name, streams=None, - scheduled_transfer_period=None, sampling_frequency_in_seconds=None, counter_specifiers=None): from ..custom import monitor_data_collection_rule_show @@ -372,8 +415,6 @@ def data_collection_rules_performance_counters_update(client, if item['name'] == name: if streams is not None: item['streams'] = streams - if scheduled_transfer_period is not None: - item['scheduled_transfer_period'] = scheduled_transfer_period if sampling_frequency_in_seconds is not None: item['sampling_frequency_in_seconds'] = sampling_frequency_in_seconds if counter_specifiers is not None: @@ -412,7 +453,6 @@ def data_collection_rules_windows_event_logs_add(client, data_collection_rule_name, name, streams, - scheduled_transfer_period, x_path_queries): from ..custom import monitor_data_collection_rule_show instance = monitor_data_collection_rule_show(client, resource_group_name, data_collection_rule_name) @@ -431,7 +471,6 @@ def data_collection_rules_windows_event_logs_add(client, item = { 'name': name, 'streams': streams, - 'scheduled_transfer_period': scheduled_transfer_period, 'x_path_queries': x_path_queries } @@ -470,7 +509,6 @@ def data_collection_rules_windows_event_logs_update(client, data_collection_rule_name, name, streams=None, - scheduled_transfer_period=None, x_path_queries=None): from ..custom import monitor_data_collection_rule_show instance = monitor_data_collection_rule_show(client, resource_group_name, data_collection_rule_name) @@ -485,8 +523,6 @@ def data_collection_rules_windows_event_logs_update(client, if item['name'] == name: if streams is not None: item['streams'] = streams - if scheduled_transfer_period is not None: - item['scheduled_transfer_period'] = scheduled_transfer_period if x_path_queries is not None: item['x_path_queries'] = x_path_queries break diff --git a/src/monitor-control-service/azext_amcs/tests/__init__.py b/src/monitor-control-service/azext_amcs/tests/__init__.py deleted file mode 100644 index 50e0627daff..00000000000 --- a/src/monitor-control-service/azext_amcs/tests/__init__.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -import inspect -import logging -import os -import sys -import traceback -import datetime as dt - -from azure.core.exceptions import AzureError -from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError - - -logger = logging.getLogger('azure.cli.testsdk') -logger.addHandler(logging.StreamHandler()) -__path__ = __import__('pkgutil').extend_path(__path__, __name__) -exceptions = [] -test_map = dict() -SUCCESSED = "successed" -FAILED = "failed" - - -def try_manual(func): - def import_manual_function(origin_func): - from importlib import import_module - decorated_path = inspect.getfile(origin_func) - module_path = __path__[0] - if not decorated_path.startswith(module_path): - raise Exception("Decorator can only be used in submodules!") - manual_path = os.path.join( - decorated_path[module_path.rfind(os.path.sep) + 1:]) - manual_file_path, manual_file_name = os.path.split(manual_path) - module_name, _ = os.path.splitext(manual_file_name) - manual_module = "..manual." + \ - ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) - return getattr(import_module(manual_module, package=__name__), origin_func.__name__) - - def get_func_to_call(): - func_to_call = func - try: - func_to_call = import_manual_function(func) - func_to_call = import_manual_function(func) - logger.info("Found manual override for %s(...)", func.__name__) - except (ImportError, AttributeError): - pass - return func_to_call - - def wrapper(*args, **kwargs): - func_to_call = get_func_to_call() - logger.info("running %s()...", func.__name__) - try: - test_map[func.__name__] = dict() - test_map[func.__name__]["result"] = SUCCESSED - test_map[func.__name__]["error_message"] = "" - test_map[func.__name__]["error_stack"] = "" - test_map[func.__name__]["error_normalized"] = "" - test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() - ret = func_to_call(*args, **kwargs) - except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, - JMESPathCheckAssertionError) as e: - test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() - test_map[func.__name__]["result"] = FAILED - test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] - test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( - "\r\n", " ").replace("\n", " ")[:500] - logger.info("--------------------------------------") - logger.info("step exception: %s", e) - logger.error("--------------------------------------") - logger.error("step exception in %s: %s", func.__name__, e) - logger.info(traceback.format_exc()) - exceptions.append((func.__name__, sys.exc_info())) - else: - test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() - return ret - - if inspect.isclass(func): - return get_func_to_call() - return wrapper - - -def calc_coverage(filename): - filename = filename.split(".")[0] - coverage_name = filename + "_coverage.md" - with open(coverage_name, "w") as f: - f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") - total = len(test_map) - covered = 0 - for k, v in test_map.items(): - if not k.startswith("step_"): - total -= 1 - continue - if v["result"] == SUCCESSED: - covered += 1 - f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" - "{end_dt}|\n".format(step_name=k, **v)) - f.write("Coverage: {}/{}\n".format(covered, total)) - print("Create coverage\n", file=sys.stderr) - - -def raise_if(): - if exceptions: - if len(exceptions) <= 1: - raise exceptions[0][1][1] - message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) - message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) - raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/monitor-control-service/azext_amcs/tests/latest/example_steps.py b/src/monitor-control-service/azext_amcs/tests/latest/example_steps.py deleted file mode 100644 index a4e8f18da03..00000000000 --- a/src/monitor-control-service/azext_amcs/tests/latest/example_steps.py +++ /dev/null @@ -1,123 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - - -from .. import try_manual - - -# EXAMPLE: /DataCollectionRules/put/Create or update data collection rule - - -# EXAMPLE: /DataCollectionRules/get/Get data collection rule -@try_manual -def step_data_collection_rule_show(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule show ' - '--name "{myDataCollectionRule}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRules/get/List data collection rules by resource group -@try_manual -def step_data_collection_rule_list_by_resource_group(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule list ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRules/get/List data collection rules by subscription -@try_manual -def step_data_collection_rule_list_by_subscription(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule list ', - checks=checks) - - -# EXAMPLE: /DataCollectionRules/patch/Update data collection rule -@try_manual -def step_data_collection_rule_update(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule update ' - '--tags tag1="A" tag2="B" tag3="C" ' - '--name "{myDataCollectionRule}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRuleAssociations/put/Create or update association -@try_manual -def step_data_collection_rule_association_create(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule association create ' - '--name "{myAssociation}" ' - '--rule-id "{rule_id}" ' - '--resource "{vm_id}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRuleAssociations/get/Get association -@try_manual -def step_data_collection_rule_association_show(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule association show ' - '--name "{myAssociation}" ' - '--resource "{vm_id}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRuleAssociations/get/List associations for specified data collection rule -@try_manual -def step_data_collection_rule_association_list_by_rule(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule association list ' - '--rule-name "{myDataCollectionRule}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /DataCollectionRuleAssociations/get/List associations for specified resource -@try_manual -def step_data_collection_rule_association_list_by_resource(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule association list ' - '--resource "{vm_id}" ', - checks=checks) - - -# EXAMPLE: /DataCollectionRuleAssociations/delete/Delete association -@try_manual -def step_data_collection_rule_association_delete(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule association delete -y ' - '--name "{myAssociation}" ' - '--resource "{vm_id}" ', - checks=checks) - - -# EXAMPLE: /DataCollectionRules/delete/Delete data collection rule -@try_manual -def step_data_collection_rule_delete(test, _, checks=None): - if checks is None: - checks = [] - test.cmd('az monitor data-collection rule delete -y ' - '--name "{myDataCollectionRule}" ' - '--resource-group "{rg}"', - checks=checks) diff --git a/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_amcs_data_collection_endpoint.yaml b/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_amcs_data_collection_endpoint.yaml new file mode 100644 index 00000000000..ac82fb12053 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_amcs_data_collection_endpoint.yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --public-network-access + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest_amcs_endpoints000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001","name":"clitest_amcs_endpoints000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2021-05-27T07:25:20Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '433' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:25 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": "eastus2euap", "properties": {"networkAcls": {"publicNetworkAccess": + "Disabled"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint create + Connection: + - keep-alive + Content-Length: + - '95' + Content-Type: + - application/json + ParameterSetName: + - -g -n --public-network-access + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1?api-version=2021-04-01 + response: + body: + string: '{"properties":{"immutableId":"dce-20a0c7744d92462dab029b274da94533","configurationAccess":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Disabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1","name":"endpoint1","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01005984-0000-3400-0000-60af496e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:32.1877003Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:32.1877003Z"}}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '940' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:35 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '59' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint update + Connection: + - keep-alive + ParameterSetName: + - -g -n --public-network-access --kind + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1?api-version=2021-04-01 + response: + body: + string: '{"properties":{"immutableId":"dce-20a0c7744d92462dab029b274da94533","configurationAccess":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Disabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1","name":"endpoint1","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01005984-0000-3400-0000-60af496e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:32.1877003Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:32.1877003Z"}}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '940' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:37 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2euap", "kind": "Windows", "properties": {"immutableId": + "dce-20a0c7744d92462dab029b274da94533", "configurationAccess": {}, "logsIngestion": + {}, "networkAcls": {"publicNetworkAccess": "Enabled"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint update + Connection: + - keep-alive + Content-Length: + - '216' + Content-Type: + - application/json + ParameterSetName: + - -g -n --public-network-access --kind + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1?api-version=2021-04-01 + response: + body: + string: '{"properties":{"immutableId":"dce-20a0c7744d92462dab029b274da94533","configurationAccess":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Windows","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1","name":"endpoint1","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006184-0000-3400-0000-60af49730000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:32.1877003Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:39.2156275Z"}}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '956' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '59' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint create + Connection: + - keep-alive + ParameterSetName: + - -g -n --public-network-access --kind + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest_amcs_endpoints000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001","name":"clitest_amcs_endpoints000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2021-05-27T07:25:20Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '433' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:43 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": "eastus2euap", "kind": "Linux", "properties": {"networkAcls": + {"publicNetworkAccess": "Enabled"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint create + Connection: + - keep-alive + Content-Length: + - '111' + Content-Type: + - application/json + ParameterSetName: + - -g -n --public-network-access --kind + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2?api-version=2021-04-01 + response: + body: + string: '{"properties":{"immutableId":"dce-fb5a318363404a6d99c12ad2d598066e","configurationAccess":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Linux","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2","name":"endpoint2","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006584-0000-3400-0000-60af497e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:48.438582Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:48.438582Z"}}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:51 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '59' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2?api-version=2021-04-01 + response: + body: + string: '{"properties":{"immutableId":"dce-fb5a318363404a6d99c12ad2d598066e","configurationAccess":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Linux","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2","name":"endpoint2","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006584-0000-3400-0000-60af497e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:48.438582Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:48.438582Z"}}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:53 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints?api-version=2021-04-01 + response: + body: + string: '{"value":[{"properties":{"immutableId":"dce-20a0c7744d92462dab029b274da94533","configurationAccess":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Windows","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1","name":"endpoint1","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006184-0000-3400-0000-60af49730000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:32.1877003Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:39.2156275Z"}},{"properties":{"immutableId":"dce-fb5a318363404a6d99c12ad2d598066e","configurationAccess":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint2-e5xp.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Linux","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2","name":"endpoint2","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006584-0000-3400-0000-60af497e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:48.438582Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:48.438582Z"}}],"nextLink":null}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '1937' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:25:55 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint2?api-version=2021-04-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 27 May 2021 07:26:02 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor data-collection endpoint list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints?api-version=2021-04-01 + response: + body: + string: '{"value":[{"properties":{"immutableId":"dce-20a0c7744d92462dab029b274da94533","configurationAccess":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.handler.control.monitor.azure.com"},"logsIngestion":{"endpoint":"https://endpoint1-v5th.eastus2euap-1.ingest.monitor.azure.com"},"networkAcls":{"publicNetworkAccess":"Enabled"},"provisioningState":"Succeeded"},"location":"eastus2euap","kind":"Windows","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest_amcs_endpoints000001/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1","name":"endpoint1","type":"Microsoft.Insights/dataCollectionEndpoints","etag":"\"01006184-0000-3400-0000-60af49730000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T07:25:32.1877003Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T07:25:39.2156275Z"}}],"nextLink":null}' + headers: + api-supported-versions: + - '2021-04-01' + cache-control: + - no-cache + content-length: + - '984' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 May 2021 07:26:04 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:2bbfbac8-e1b0-44af-b9c6-3a40669d37e3 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_monitor_control_service_Scenario.yaml b/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_monitor_control_service_Scenario.yaml index c19e7684e36..66d9be3d0ca 100644 --- a/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_monitor_control_service_Scenario.yaml +++ b/src/monitor-control-service/azext_amcs/tests/latest/recordings/test_monitor_control_service_Scenario.yaml @@ -15,42 +15,38 @@ interactions: Content-Length: - '177' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"0c25a664-0a09-4c35-8c73-b5a83cad7d71\",\r\n \"provisioningState\": \"Creating\",\r\n + \"e1f3c979-79c2-4132-95eb-ef451a1d189b\",\r\n \"provisioningState\": \"Creating\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 100,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:40:10 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Sun, 06 Dec 2020 13:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:40:10 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:40:10 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n + 100,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:00:43 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n + \ \"quotaNextResetTime\": \"Fri, 28 May 2021 03:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:00:43 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:00:43 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:40:11 GMT + - Thu, 27 May 2021 05:00:44 GMT pragma: - no-cache server: @@ -72,7 +68,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -82,36 +78,34 @@ interactions: ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"0c25a664-0a09-4c35-8c73-b5a83cad7d71\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \"e1f3c979-79c2-4132-95eb-ef451a1d189b\",\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 100,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:40:10 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n \"quotaNextResetTime\": - \"Sun, 06 Dec 2020 13:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:40:10 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:40:11 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n + 100,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:00:43 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n + \ \"quotaNextResetTime\": \"Fri, 28 May 2021 03:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:00:43 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:00:46 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:40:45 GMT + - Thu, 27 May 2021 05:01:14 GMT pragma: - no-cache server: @@ -147,42 +141,38 @@ interactions: Content-Length: - '177' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"5d339633-eb2e-4d42-a54c-333ff72434b7\",\r\n \"provisioningState\": \"Creating\",\r\n + \"54976f20-00d4-4abf-a6b6-fcf82ee13639\",\r\n \"provisioningState\": \"Creating\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 300,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:40:56 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Mon, 07 Dec 2020 03:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:40:56 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:40:56 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n + 300,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:01:23 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n + \ \"quotaNextResetTime\": \"Thu, 27 May 2021 07:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:01:23 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:01:23 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:40:57 GMT + - Thu, 27 May 2021 05:01:24 GMT pragma: - no-cache server: @@ -204,7 +194,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -214,36 +204,34 @@ interactions: ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"5d339633-eb2e-4d42-a54c-333ff72434b7\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \"54976f20-00d4-4abf-a6b6-fcf82ee13639\",\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 300,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:40:56 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n \"quotaNextResetTime\": - \"Mon, 07 Dec 2020 03:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:40:56 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:40:57 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n + 300,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:01:23 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n + \ \"quotaNextResetTime\": \"Thu, 27 May 2021 07:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:01:23 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:01:24 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:41:28 GMT + - Thu, 27 May 2021 05:01:54 GMT pragma: - no-cache server: @@ -279,42 +267,38 @@ interactions: Content-Length: - '177' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"8a7b820a-4350-409f-8839-03c6c7fa582d\",\r\n \"provisioningState\": \"Creating\",\r\n + \"1fb933a2-3b43-4ede-acbd-ec1fa089717d\",\r\n \"provisioningState\": \"Creating\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 200,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:41:39 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": - \"Mon, 07 Dec 2020 03:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:41:39 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:41:39 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n + 200,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:02:03 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n + \ \"quotaNextResetTime\": \"Thu, 27 May 2021 09:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:02:03 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:02:03 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n \ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:41:40 GMT + - Thu, 27 May 2021 05:02:04 GMT pragma: - no-cache server: @@ -336,7 +320,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -346,36 +330,34 @@ interactions: ParameterSetName: - -g -n --location --quota --level --sku User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.7.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-mgmt-loganalytics/8.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"8a7b820a-4350-409f-8839-03c6c7fa582d\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \"1fb933a2-3b43-4ede-acbd-ec1fa089717d\",\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"sku\": {\r\n \"name\": \"capacityreservation\",\r\n \"capacityReservationLevel\": - 200,\r\n \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": - \"Sun, 06 Dec 2020 05:41:39 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n - \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n - \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n - \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n \"quotaNextResetTime\": - \"Mon, 07 Dec 2020 03:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n - \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": - \"Enabled\",\r\n \"createdDate\": \"Sun, 06 Dec 2020 05:41:39 GMT\",\r\n - \ \"modifiedDate\": \"Sun, 06 Dec 2020 05:41:40 GMT\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n + 200,\r\n \"lastSkuUpdate\": \"Thu, 27 May 2021 05:02:03 GMT\"\r\n },\r\n + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\n + \ \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": + true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 1.0,\r\n + \ \"quotaNextResetTime\": \"Thu, 27 May 2021 09:00:00 GMT\",\r\n \"dataIngestionStatus\": + \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n + \ \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"createdDate\": + \"Thu, 27 May 2021 05:02:03 GMT\",\r\n \"modifiedDate\": \"Thu, 27 May + 2021 05:02:05 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n \ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \ \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1227' + - '1183' content-type: - application/json date: - - Sun, 06 Dec 2020 05:42:11 GMT + - Thu, 27 May 2021 05:02:35 GMT pragma: - no-cache server: @@ -409,15 +391,12 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-12-06T05:39:55Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-05-27T05:00:29Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -426,7 +405,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:42:15 GMT + - Thu, 27 May 2021 05:02:36 GMT expires: - '-1' pragma: @@ -505,35 +484,35 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Sun, 06 Dec 2020 05:42:16 GMT + - Thu, 27 May 2021 05:02:37 GMT etag: - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" expires: - - Sun, 06 Dec 2020 05:47:16 GMT + - Thu, 27 May 2021 05:07:37 GMT source-age: - - '279' + - '0' strict-transport-security: - max-age=31536000 vary: - Authorization,Accept-Encoding via: - - 1.1 varnish (Varnish/6.0), 1.1 varnish + - 1.1 varnish x-cache: - - HIT, HIT + - HIT x-cache-hits: - - 3, 1 + - '1' x-content-type-options: - nosniff x-fastly-request-id: - - a7f44bad3f4be534fc13b497429bc657ceed74fc + - 182007291e6b82255e79daa85764cc13a4c5e26c x-frame-options: - deny x-github-request-id: - - 0C3E:885E:2EF0F3:3740F8:5FCC692E + - 7E5E:3B3E:63EE34:75DB8C:60AF1DE6 x-served-by: - - cache-sin18043-SIN + - cache-qpg1269-QPG x-timer: - - S1607233337.658557,VS0,VE1 + - S1622091757.967009,VS0,VE287 x-xss-protection: - 1; mode=block status: @@ -543,7 +522,7 @@ interactions: body: null headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate CommandName: @@ -553,10 +532,7 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-network/12.0.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 response: @@ -570,7 +546,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:42:17 GMT + - Thu, 27 May 2021 05:02:37 GMT expires: - '-1' pragma: @@ -606,7 +582,7 @@ interactions: "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}}], "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}}, - {"apiVersion": "2020-06-01", "type": "Microsoft.Compute/virtualMachines", "name": + {"apiVersion": "2020-12-01", "type": "Microsoft.Compute/virtualMachines", "name": "vm1", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1VMNic"], "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"}]}, @@ -615,7 +591,7 @@ interactions: {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": "latest"}}, "osProfile": {"computerName": "vm1", "adminUsername": "testadmin", "adminPassword": "[parameters(''adminPassword'')]"}}}], "outputs": {}}, "parameters": - {"adminPassword": {"value": "TestPassword11!!"}}, "mode": "Incremental"}}' + {"adminPassword": {"value": "TestPassword11!!"}}, "mode": "incremental"}}' headers: Accept: - application/json @@ -628,30 +604,27 @@ interactions: Content-Length: - '3316' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_Tu6VEXk8F7OwVxxxi4ghzDX3tNIEVkNZ","name":"vm_deploy_Tu6VEXk8F7OwVxxxi4ghzDX3tNIEVkNZ","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16950604059441059810","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2020-12-06T05:42:23.2441834Z","duration":"PT2.508027S","correlationId":"65ea4c4d-fde6-4032-9080-0bb67207108b","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_wJCgfYlJ8wEzfv4f9A3TCBTcmv2yG4JH","name":"vm_deploy_wJCgfYlJ8wEzfv4f9A3TCBTcmv2yG4JH","type":"Microsoft.Resources/deployments","properties":{"templateHash":"697295396846284346","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-05-27T05:02:42.619245Z","duration":"PT2.459995S","correlationId":"6278bf0f-a9b0-444b-8e5b-69b426a361d1","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_Tu6VEXk8F7OwVxxxi4ghzDX3tNIEVkNZ/operationStatuses/08585943735447414798?api-version=2020-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_wJCgfYlJ8wEzfv4f9A3TCBTcmv2yG4JH/operationStatuses/08585795151253183926?api-version=2020-10-01 cache-control: - no-cache content-length: - - '2781' + - '2778' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:42:24 GMT + - Thu, 27 May 2021 05:02:43 GMT expires: - '-1' pragma: @@ -669,136 +642,7 @@ interactions: body: null headers: Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -g -n --image --admin-password --admin-username --authentication-type - User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 - response: - body: - string: '{"status":"Running"}' - headers: - cache-control: - - no-cache - content-length: - - '20' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 06 Dec 2020 05:42:56 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -g -n --image --admin-password --admin-username --authentication-type - User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 - response: - body: - string: '{"status":"Running"}' - headers: - cache-control: - - no-cache - content-length: - - '20' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 06 Dec 2020 05:43:26 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -g -n --image --admin-password --admin-username --authentication-type - User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 - response: - body: - string: '{"status":"Running"}' - headers: - cache-control: - - no-cache - content-length: - - '20' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 06 Dec 2020 05:43:56 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -808,10 +652,9 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585795151253183926?api-version=2020-10-01 response: body: string: '{"status":"Running"}' @@ -823,7 +666,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:44:27 GMT + - Thu, 27 May 2021 05:03:14 GMT expires: - '-1' pragma: @@ -841,7 +684,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -851,10 +694,9 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585795151253183926?api-version=2020-10-01 response: body: string: '{"status":"Running"}' @@ -866,7 +708,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:44:58 GMT + - Thu, 27 May 2021 05:03:44 GMT expires: - '-1' pragma: @@ -884,7 +726,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -894,10 +736,9 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585943735447414798?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585795151253183926?api-version=2020-10-01 response: body: string: '{"status":"Succeeded"}' @@ -909,7 +750,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:29 GMT + - Thu, 27 May 2021 05:04:14 GMT expires: - '-1' pragma: @@ -927,7 +768,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -937,22 +778,21 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.1 + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_Tu6VEXk8F7OwVxxxi4ghzDX3tNIEVkNZ","name":"vm_deploy_Tu6VEXk8F7OwVxxxi4ghzDX3tNIEVkNZ","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16950604059441059810","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2020-12-06T05:45:02.9922837Z","duration":"PT2M42.2561273S","correlationId":"65ea4c4d-fde6-4032-9080-0bb67207108b","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_wJCgfYlJ8wEzfv4f9A3TCBTcmv2yG4JH","name":"vm_deploy_wJCgfYlJ8wEzfv4f9A3TCBTcmv2yG4JH","type":"Microsoft.Resources/deployments","properties":{"templateHash":"697295396846284346","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-05-27T05:03:49.0282913Z","duration":"PT1M8.8690413S","correlationId":"6278bf0f-a9b0-444b-8e5b-69b426a361d1","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' headers: cache-control: - no-cache content-length: - - '3849' + - '3846' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:29 GMT + - Thu, 27 May 2021 05:04:15 GMT expires: - '-1' pragma: @@ -980,26 +820,23 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-compute/14.0.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/20.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2020-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2020-12-01 response: body: string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"be397c73-e2a7-498a-a630-c5010ba8f607\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"0a235e8d-d3d8-4119-b7fc-e04a7dc2bf67\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"18.04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"18.04.202012010\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": - \"Linux\",\r\n \"name\": \"vm1_disk1_1fa977164e6a4e059e2ab8a45006eefc\",\r\n + \"18.04.202105120\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"name\": \"vm1_OsDisk_1_d09f6bcdeee04c2385abfad23784df25\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/vm1_disk1_1fa977164e6a4e059e2ab8a45006eefc\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/vm1_OsDisk_1_d09f6bcdeee04c2385abfad23784df25\"\r\n \ },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\",\r\n \ \"adminUsername\": \"testadmin\",\r\n \"linuxConfiguration\": {\r\n @@ -1010,19 +847,19 @@ interactions: {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"}]},\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"computerName\": \"vm1\",\r\n \"osName\": \"ubuntu\",\r\n \"osVersion\": \"18.04\",\r\n - \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.2.52\",\r\n \"statuses\": + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.3.0.2\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \ \"message\": \"Guest Agent is running\",\r\n \"time\": - \"2020-12-06T05:45:29+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": - []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"vm1_disk1_1fa977164e6a4e059e2ab8a45006eefc\",\r\n + \"2021-05-27T05:04:00+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": + []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"vm1_OsDisk_1_d09f6bcdeee04c2385abfad23784df25\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2020-12-06T05:44:43.5059188+00:00\"\r\n + succeeded\",\r\n \"time\": \"2021-05-27T05:03:20.6650778+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": - \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded/osProvisioningInProgress\",\r\n - \ \"level\": \"Info\",\r\n \"displayStatus\": \"OS provisioning - in progress\",\r\n \"time\": \"2020-12-06T05:45:00.2254429+00:00\"\r\n + \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2021-05-27T05:03:47.6494974+00:00\"\r\n \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n \ }\r\n ]\r\n }\r\n }\r\n}" @@ -1030,11 +867,11 @@ interactions: cache-control: - no-cache content-length: - - '3281' + - '3261' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:30 GMT + - Thu, 27 May 2021 05:04:16 GMT expires: - '-1' pragma: @@ -1051,7 +888,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31989 + - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31997 status: code: 200 message: OK @@ -1059,7 +896,7 @@ interactions: body: null headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate CommandName: @@ -1069,21 +906,18 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-network/12.0.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2018-01-01 response: body: string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\",\r\n - \ \"etag\": \"W/\\\"0774c17b-3f4c-43e5-ab2c-3664ce052dcc\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"cae235b3-f078-4e65-acfb-8061bc6792c4\\\"\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"0b627daf-60e6-4868-8b62-cd5c7d3a7c3a\",\r\n + \"Succeeded\",\r\n \"resourceGuid\": \"ba7b35de-3f41-4f51-adae-9ce0f74d48c8\",\r\n \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\",\r\n - \ \"etag\": \"W/\\\"0774c17b-3f4c-43e5-ab2c-3664ce052dcc\\\"\",\r\n + \ \"etag\": \"W/\\\"cae235b3-f078-4e65-acfb-8061bc6792c4\\\"\",\r\n \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": @@ -1092,8 +926,8 @@ interactions: \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": - \"e4np3l5juenu1gof3ek3e0ix0h.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": - \"00-22-48-04-19-64\",\r\n \"enableAcceleratedNetworking\": false,\r\n + \"h2fageeraunevd35g4lbxmsthh.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"00-0D-3A-33-DA-A9\",\r\n \"enableAcceleratedNetworking\": false,\r\n \ \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": {\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\r\n \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": @@ -1107,9 +941,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:31 GMT + - Thu, 27 May 2021 05:04:17 GMT etag: - - W/"0774c17b-3f4c-43e5-ab2c-3664ce052dcc" + - W/"cae235b3-f078-4e65-acfb-8061bc6792c4" expires: - '-1' pragma: @@ -1126,7 +960,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2ee5ed48-9f70-4817-bc2e-8bbcef0cb10b + - 3f5b88f3-499c-4a57-a966-0aa1d33b2c9e status: code: 200 message: OK @@ -1134,7 +968,7 @@ interactions: body: null headers: Accept: - - application/json + - application/json, text/json Accept-Encoding: - gzip, deflate CommandName: @@ -1144,19 +978,16 @@ interactions: ParameterSetName: - -g -n --image --admin-password --admin-username --authentication-type User-Agent: - - python/3.8.5 (Windows-10-10.0.19041-SP0) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-network/12.0.0 Azure-SDK-For-Python AZURECLI/2.15.1 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2018-01-01 response: body: string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\",\r\n - \ \"etag\": \"W/\\\"32a05f9f-eca1-4666-baed-c58e0c9f0650\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"bdf3af73-d300-4abe-8600-66387e7da23c\\\"\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"e276be60-1607-4694-bcbf-f95af2d122c5\",\r\n - \ \"ipAddress\": \"104.42.60.97\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \"Succeeded\",\r\n \"resourceGuid\": \"888384cb-1ed2-47ba-a49a-db6a8724735a\",\r\n + \ \"ipAddress\": \"104.42.45.39\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\r\n \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n @@ -1169,9 +1000,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:32 GMT + - Thu, 27 May 2021 05:04:17 GMT etag: - - W/"32a05f9f-eca1-4666-baed-c58e0c9f0650" + - W/"bdf3af73-d300-4abe-8600-66387e7da23c" expires: - '-1' pragma: @@ -1188,21 +1019,19 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - eec5c5e2-4a20-4038-90b0-eea1e2b2af52 + - f0a16fa3-53dd-4317-9ab0-f37886358001 status: code: 200 message: OK - request: body: '{"location": "eastus", "properties": {"dataSources": {"performanceCounters": - [{"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": - 15, "counterSpecifiers": ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed - Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", "\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"], "name": "cloudTeamCoreCounters"}, {"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": 30, "counterSpecifiers": + [{"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 15, "counterSpecifiers": + ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free + Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": - [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT1M", - "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -1220,35 +1049,35 @@ interactions: Connection: - keep-alive Content-Length: - - '1594' + - '1454' Content-Type: - application/json ParameterSetName: - - -g -n --location --data-flow --log-analytics --performance-counter --performance-counter - --syslog --windows-event-log --windows-event-log + - -g -n --location --data-flows --log-analytics --performance-counters --performance-counters + --syslog --windows-event-logs --windows-event-logs User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000f800-0000-0100-0000-5fcc70050000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033e81-0000-0100-0000-60af28570000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:21.728359Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2003' + - '2099' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:42 GMT + - Thu, 27 May 2021 05:04:25 GMT expires: - '-1' pragma: @@ -1284,28 +1113,28 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000f800-0000-0100-0000-5fcc70050000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033e81-0000-0100-0000-60af28570000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:21.728359Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2003' + - '2099' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:45 GMT + - Thu, 27 May 2021 05:04:27 GMT expires: - '-1' pragma: @@ -1339,28 +1168,28 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules?api-version=2021-04-01 response: body: - string: '{"value":[{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"value":[{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000f800-0000-0100-0000-5fcc70050000\""}],"nextLink":null}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033e81-0000-0100-0000-60af28570000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:21.728359Z"}}],"nextLink":null}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2031' + - '2127' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:48 GMT + - Thu, 27 May 2021 05:04:28 GMT expires: - '-1' pragma: @@ -1392,64 +1221,28 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/dataCollectionRules?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/dataCollectionRules?api-version=2021-04-01 response: body: - string: '{"value":[{"properties":{"immutableId":"dcr-c3ea0fc412a941d6b02c733cf533e158","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"value":[{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"},{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestn6u6lguqr4ny3ykff7fdoyjhiokfg7klxijg7dt5vqpmo7e67uply5hhhpimiyupqrkd/providers/microsoft.operationalinsights/workspaces/clitestepv754tpxcsgp","workspaceId":"54bfce71-0209-443c-a259-3228791c9279","name":"clitestepv754tpxcsgp"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestepv754tpxcsgp"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestn6u6lguqr4ny3ykff7fdoyjhiokfg7klxijg7dt5vqpmo7e67uply5hhhpimiyupqrkd/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00002f00-0000-0100-0000-5fcb9c920000\""},{"properties":{"immutableId":"dcr-f32a6cd3a4554c37a11a82faf86fe5b6","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"},{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitesteqdzs5d5mmwscgzjdnbcaive4nejxahwlqklg6pmsitconentqj2q23qaiihmliocnzi/providers/microsoft.operationalinsights/workspaces/clitestlnqqp426mxgls","workspaceId":"74a72d18-9279-41a6-97a4-9891d7961b13","name":"clitestlnqqp426mxgls"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestlnqqp426mxgls"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitesteqdzs5d5mmwscgzjdnbcaive4nejxahwlqklg6pmsitconentqj2q23qaiihmliocnzi/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00003600-0000-0100-0000-5fcba20d0000\""},{"properties":{"immutableId":"dcr-d8f6b47e2f444d6d839e2ebfebf35cd2","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"},{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestzdaptknrlicbtkmeula53vzxjis57e2t4f7d2puirsnoyew3p4ef2w2wfilpspjzwpl2/providers/microsoft.operationalinsights/workspaces/clitestnky3m23jgxffk","workspaceId":"a2c0bcdb-fa70-42aa-a443-57906fe02077","name":"clitestnky3m23jgxffk"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestnky3m23jgxffk"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestzdaptknrlicbtkmeula53vzxjis57e2t4f7d2puirsnoyew3p4ef2w2wfilpspjzwpl2/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00003800-0000-0100-0000-5fcba2b40000\""},{"properties":{"immutableId":"dcr-a357d7a3c36e483bacbd6f7c7b903d58","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestgkjbok3pliq3jpl2hpr2gbgsyaj26fupdxroflfjxvfyrupptkysbv6anjo2u7xfurju/providers/microsoft.operationalinsights/workspaces/clitest4gyxkatmg7k44","workspaceId":"d5756adf-7d78-4d5b-8dd9-924c5fb7afc1","name":"clitest4gyxkatmg7k44"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest4gyxkatmg7k44"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestgkjbok3pliq3jpl2hpr2gbgsyaj26fupdxroflfjxvfyrupptkysbv6anjo2u7xfurju/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00004700-0000-0100-0000-5fcba75d0000\""},{"properties":{"immutableId":"dcr-0a1394a604b14185ad4d234ecdedae29","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestz2oh4a26nxn2jiiwsqrd3avbvgtndowsdkecglxmovgjxjjgwy6qtcgm7tuarknghcq6/providers/microsoft.operationalinsights/workspaces/clitestj6s5tcifnkpe4","workspaceId":"8110f9f8-ec15-48de-b85f-ba7b31c813d0","name":"clitestj6s5tcifnkpe4"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestj6s5tcifnkpe4"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestz2oh4a26nxn2jiiwsqrd3avbvgtndowsdkecglxmovgjxjjgwy6qtcgm7tuarknghcq6/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00008f00-0000-0100-0000-5fcc22dc0000\""},{"properties":{"immutableId":"dcr-a0b1f393fd5a44a3b1c644675695b0e3","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitestmzve6bgeczsnw4a3uzk76dmu7lujmnym3suxgin2ixoynxp5p7r2su4bvvhuek5mdwfa/providers/microsoft.operationalinsights/workspaces/clitestvf6vpw5nxxe62","workspaceId":"cba93a11-2599-425f-9e17-b28e488f10e3","name":"clitestvf6vpw5nxxe62"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestvf6vpw5nxxe62"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestmzve6bgeczsnw4a3uzk76dmu7lujmnym3suxgin2ixoynxp5p7r2su4bvvhuek5mdwfa/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00009300-0000-0100-0000-5fcc386d0000\""},{"properties":{"immutableId":"dcr-4a4d3cd9f2d9463b89ad4f19ba9f2083","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest6k7extwssuklw75jlmbxq5tuqk233kyeee6wamit3h3pf2mdb3vuvebwrt4egeo7zq4b/providers/microsoft.operationalinsights/workspaces/clitestbvjua2i2djjhm","workspaceId":"7cfffaf6-8448-488d-a188-9f2c12fdf062","name":"clitestbvjua2i2djjhm"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitestbvjua2i2djjhm"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest6k7extwssuklw75jlmbxq5tuqk233kyeee6wamit3h3pf2mdb3vuvebwrt4egeo7zq4b/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000b500-0000-0100-0000-5fcc3fb60000\""},{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level - = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000f800-0000-0100-0000-5fcc70050000\""}],"nextLink":null}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033e81-0000-0100-0000-60af28570000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:21.728359Z"}}],"nextLink":null}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '16609' + - '2127' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:50 GMT + - Thu, 27 May 2021 05:04:31 GMT expires: - '-1' pragma: @@ -1483,28 +1276,28 @@ interactions: ParameterSetName: - --tags --name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000f800-0000-0100-0000-5fcc70050000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033e81-0000-0100-0000-60af28570000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:21.728359Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2003' + - '2099' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:51 GMT + - Thu, 27 May 2021 05:04:33 GMT expires: - '-1' pragma: @@ -1527,14 +1320,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -1552,34 +1344,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1643' + - '1503' Content-Type: - application/json ParameterSetName: - --tags --name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fa00-0000-0100-0000-5fcc70100000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24030b82-0000-0100-0000-60af28630000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:34.6668503Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:54 GMT + - Thu, 27 May 2021 05:04:38 GMT expires: - '-1' pragma: @@ -1597,7 +1389,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '58' + - '59' status: code: 200 message: OK @@ -1615,28 +1407,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fa00-0000-0100-0000-5fcc70100000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24030b82-0000-0100-0000-60af28630000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:34.6668503Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:57 GMT + - Thu, 27 May 2021 05:04:39 GMT expires: - '-1' pragma: @@ -1659,14 +1451,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -1685,34 +1476,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1918' + - '1778' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fb00-0000-0100-0000-5fcc70160000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034e82-0000-0100-0000-60af28680000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:39.7318852Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:45:58 GMT + - Thu, 27 May 2021 05:04:40 GMT expires: - '-1' pragma: @@ -1730,7 +1521,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '59' + - '58' status: code: 200 message: OK @@ -1748,28 +1539,28 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fb00-0000-0100-0000-5fcc70160000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034e82-0000-0100-0000-60af28680000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:39.7318852Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:01 GMT + - Thu, 27 May 2021 05:04:42 GMT expires: - '-1' pragma: @@ -1803,28 +1594,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fb00-0000-0100-0000-5fcc70160000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034e82-0000-0100-0000-60af28680000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:39.7318852Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:03 GMT + - Thu, 27 May 2021 05:04:44 GMT expires: - '-1' pragma: @@ -1858,28 +1649,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fb00-0000-0100-0000-5fcc70160000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034e82-0000-0100-0000-60af28680000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:39.7318852Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:04 GMT + - Thu, 27 May 2021 05:04:46 GMT expires: - '-1' pragma: @@ -1902,14 +1693,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -1928,34 +1718,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1918' + - '1778' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004","workspaceId":"8a7b820a-4350-409f-8839-03c6c7fa582d","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fc00-0000-0100-0000-5fcc701d0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004","workspaceId":"1fb933a2-3b43-4ede-acbd-ec1fa089717d","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403d582-0000-0100-0000-60af28700000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:47.1234635Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:05 GMT + - Thu, 27 May 2021 05:04:48 GMT expires: - '-1' pragma: @@ -1973,7 +1763,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '58' + - '59' status: code: 200 message: OK @@ -1991,28 +1781,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004","workspaceId":"8a7b820a-4350-409f-8839-03c6c7fa582d","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fc00-0000-0100-0000-5fcc701d0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000004","workspaceId":"1fb933a2-3b43-4ede-acbd-ec1fa089717d","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403d582-0000-0100-0000-60af28700000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:47.1234635Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:08 GMT + - Thu, 27 May 2021 05:04:49 GMT expires: - '-1' pragma: @@ -2035,14 +1825,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -2060,34 +1849,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1643' + - '1503' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fd00-0000-0100-0000-5fcc70210000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403fe82-0000-0100-0000-60af28730000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:50.6813746Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:08 GMT + - Thu, 27 May 2021 05:04:50 GMT expires: - '-1' pragma: @@ -2122,30 +1911,30 @@ interactions: - keep-alive ParameterSetName: - --rule-name --resource-group --name --counter-specifiers --sampling-frequency - --transfer-period --streams + --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fd00-0000-0100-0000-5fcc70210000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403fe82-0000-0100-0000-60af28730000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:50.6813746Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:11 GMT + - Thu, 27 May 2021 05:04:53 GMT expires: - '-1' pragma: @@ -2168,22 +1957,20 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": - 15, "counterSpecifiers": ["\\Memory\\Committed Bytes", "\\Processor(_Total)\\% - Processor Time"], "name": "extraCounters"}], "windowsEventLogs": [{"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT1M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}, {"streams": + ["Microsoft-Perf"], "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Memory\\Committed + Bytes", "\\Processor(_Total)\\% Processor Time"], "name": "extraCounters"}], + "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], - "scheduledTransferPeriod": "PT5M", "xPathQueries": ["System![System[(Level = - 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = - 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], - "facilityNames": ["syslog"], "logLevels": ["Alert", "Critical", "Emergency"], - "name": "syslogBase"}]}, "destinations": {"logAnalytics": [{"workspaceResourceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", + "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level + = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": + [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": + ["Alert", "Critical", "Emergency"], "name": "syslogBase"}]}, "destinations": + {"logAnalytics": [{"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", "name": "clitest000002"}]}, "dataFlows": [{"streams": ["Microsoft-Perf", "Microsoft-Syslog", "Microsoft-WindowsEvent"], "destinations": ["clitest000002"]}]}}' headers: @@ -2196,36 +1983,36 @@ interactions: Connection: - keep-alive Content-Length: - - '1863' + - '1688' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --counter-specifiers --sampling-frequency - --transfer-period --streams + --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed - Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed + Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fe00-0000-0100-0000-5fcc70240000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033083-0000-0100-0000-60af28760000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:53.8305782Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2254' + - '2318' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:12 GMT + - Thu, 27 May 2021 05:04:54 GMT expires: - '-1' pragma: @@ -2261,29 +2048,29 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed - Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed + Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fe00-0000-0100-0000-5fcc70240000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033083-0000-0100-0000-60af28760000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:53.8305782Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2254' + - '2318' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:14 GMT + - Thu, 27 May 2021 05:04:56 GMT expires: - '-1' pragma: @@ -2317,29 +2104,29 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed - Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed + Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fe00-0000-0100-0000-5fcc70240000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033083-0000-0100-0000-60af28760000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:53.8305782Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2254' + - '2318' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:16 GMT + - Thu, 27 May 2021 05:04:56 GMT expires: - '-1' pragma: @@ -2373,29 +2160,29 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --counter-specifiers User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed - Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Memory\\Committed + Bytes","\\Processor(_Total)\\% Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000fe00-0000-0100-0000-5fcc70240000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24033083-0000-0100-0000-60af28760000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:53.8305782Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2254' + - '2318' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:17 GMT + - Thu, 27 May 2021 05:04:58 GMT expires: - '-1' pragma: @@ -2418,21 +2205,20 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": - 15, "counterSpecifiers": ["\\Processor(_Total)\\% Processor Time"], "name": - "extraCounters"}], "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], - "scheduledTransferPeriod": "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, - {"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": - ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level - = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": - [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": - ["Alert", "Critical", "Emergency"], "name": "syslogBase"}]}, "destinations": - {"logAnalytics": [{"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}, {"streams": + ["Microsoft-Perf"], "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time"], "name": "extraCounters"}], "windowsEventLogs": [{"streams": + ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, + {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level + = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level + = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": + ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": ["Alert", "Critical", + "Emergency"], "name": "syslogBase"}]}, "destinations": {"logAnalytics": [{"workspaceResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", "name": "clitest000002"}]}, "dataFlows": [{"streams": ["Microsoft-Perf", "Microsoft-Syslog", "Microsoft-WindowsEvent"], "destinations": ["clitest000002"]}]}}' headers: @@ -2445,35 +2231,35 @@ interactions: Connection: - keep-alive Content-Length: - - '1834' + - '1659' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --counter-specifiers User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000ff00-0000-0100-0000-5fcc702a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24039d83-0000-0100-0000-60af287a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:58.6286179Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2226' + - '2290' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:18 GMT + - Thu, 27 May 2021 05:04:59 GMT expires: - '-1' pragma: @@ -2491,7 +2277,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '57' + - '58' status: code: 200 message: OK @@ -2509,29 +2295,29 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% - Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + Processor Time"],"name":"extraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"0000ff00-0000-0100-0000-5fcc702a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24039d83-0000-0100-0000-60af287a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:04:58.6286179Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2226' + - '2290' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:19 GMT + - Thu, 27 May 2021 05:05:01 GMT expires: - '-1' pragma: @@ -2554,14 +2340,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -2579,34 +2364,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1643' + - '1503' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000001-0000-0100-0000-5fcc702c0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403bf83-0000-0100-0000-60af287e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:01.6532559Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:20 GMT + - Thu, 27 May 2021 05:05:02 GMT expires: - '-1' pragma: @@ -2640,30 +2425,30 @@ interactions: Connection: - keep-alive ParameterSetName: - - --rule-name --resource-group --name --transfer-period --streams --x-path-queries + - --rule-name --resource-group --name --streams --x-path-queries User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000001-0000-0100-0000-5fcc702c0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403bf83-0000-0100-0000-60af287e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:01.6532559Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:23 GMT + - Thu, 27 May 2021 05:05:03 GMT expires: - '-1' pragma: @@ -2686,21 +2471,20 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT1M", "xPathQueries": - ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level - = 1 or Level = 2 or Level = 3)]]"], "name": "extraEvents"}], "syslog": [{"streams": - ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": ["Alert", "Critical", - "Emergency"], "name": "syslogBase"}]}, "destinations": {"logAnalytics": [{"workspaceResourceId": + ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level + = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level + = 3)]]"], "name": "extraEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], + "facilityNames": ["syslog"], "logLevels": ["Alert", "Critical", "Emergency"], + "name": "syslogBase"}]}, "destinations": {"logAnalytics": [{"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", "name": "clitest000002"}]}, "dataFlows": [{"streams": ["Microsoft-Perf", "Microsoft-Syslog", "Microsoft-WindowsEvent"], "destinations": ["clitest000002"]}]}}' @@ -2714,36 +2498,36 @@ interactions: Connection: - keep-alive Content-Length: - - '1882' + - '1707' Content-Type: - application/json ParameterSetName: - - --rule-name --resource-group --name --transfer-period --streams --x-path-queries + - --rule-name --resource-group --name --streams --x-path-queries User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["System![System[(Level + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000101-0000-0100-0000-5fcc70300000\""}' + = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403f483-0000-0100-0000-60af28800000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:04.5906857Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2275' + - '2339' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:24 GMT + - Thu, 27 May 2021 05:05:04 GMT expires: - '-1' pragma: @@ -2779,30 +2563,30 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["System![System[(Level + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000101-0000-0100-0000-5fcc70300000\""}' + = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403f483-0000-0100-0000-60af28800000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:04.5906857Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2275' + - '2339' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:25 GMT + - Thu, 27 May 2021 05:05:05 GMT expires: - '-1' pragma: @@ -2836,30 +2620,30 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["System![System[(Level + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000101-0000-0100-0000-5fcc70300000\""}' + = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403f483-0000-0100-0000-60af28800000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:04.5906857Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2275' + - '2339' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:26 GMT + - Thu, 27 May 2021 05:05:07 GMT expires: - '-1' pragma: @@ -2893,30 +2677,30 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --x-path-queries User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["System![System[(Level + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000101-0000-0100-0000-5fcc70300000\""}' + = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403f483-0000-0100-0000-60af28800000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:04.5906857Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2275' + - '2339' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:29 GMT + - Thu, 27 May 2021 05:05:09 GMT expires: - '-1' pragma: @@ -2939,21 +2723,20 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT1M", "xPathQueries": - ["Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "extraEvents"}], - "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": - ["Alert", "Critical", "Emergency"], "name": "syslogBase"}]}, "destinations": - {"logAnalytics": [{"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", + ["Microsoft-WindowsEvent"], "xPathQueries": ["Application!*[System[(Level = + 1 or Level = 2 or Level = 3)]]"], "name": "extraEvents"}], "syslog": [{"streams": + ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": ["Alert", "Critical", + "Emergency"], "name": "syslogBase"}]}, "destinations": {"logAnalytics": [{"workspaceResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002", "name": "clitest000002"}]}, "dataFlows": [{"streams": ["Microsoft-Perf", "Microsoft-Syslog", "Microsoft-WindowsEvent"], "destinations": ["clitest000002"]}]}}' headers: @@ -2966,35 +2749,35 @@ interactions: Connection: - keep-alive Content-Length: - - '1824' + - '1649' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --x-path-queries User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Application!*[System[(Level - = 1 or Level = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000201-0000-0100-0000-5fcc70360000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Application!*[System[(Level + = 1 or Level = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034584-0000-0100-0000-60af28860000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:10.5712585Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2218' + - '2282' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:30 GMT + - Thu, 27 May 2021 05:05:11 GMT expires: - '-1' pragma: @@ -3030,29 +2813,29 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Application!*[System[(Level - = 1 or Level = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000201-0000-0100-0000-5fcc70360000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Application!*[System[(Level + = 1 or Level = 2 or Level = 3)]]"],"name":"extraEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24034584-0000-0100-0000-60af28860000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:10.5712585Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2218' + - '2282' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:30 GMT + - Thu, 27 May 2021 05:05:12 GMT expires: - '-1' pragma: @@ -3075,14 +2858,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3100,34 +2882,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1643' + - '1503' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000301-0000-0100-0000-5fcc70380000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24036984-0000-0100-0000-60af288a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:13.6485434Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:31 GMT + - Thu, 27 May 2021 05:05:14 GMT expires: - '-1' pragma: @@ -3145,7 +2927,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '56' + - '59' status: code: 200 message: OK @@ -3163,28 +2945,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --facility-names --log-levels --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000301-0000-0100-0000-5fcc70380000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24036984-0000-0100-0000-60af288a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:13.6485434Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:33 GMT + - Thu, 27 May 2021 05:05:15 GMT expires: - '-1' pragma: @@ -3207,14 +2989,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3234,34 +3015,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1776' + - '1636' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --facility-names --log-levels --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000401-0000-0100-0000-5fcc703a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24038484-0000-0100-0000-60af288c0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:15.737088Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2168' + - '2264' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:34 GMT + - Thu, 27 May 2021 05:05:16 GMT expires: - '-1' pragma: @@ -3297,28 +3078,28 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000401-0000-0100-0000-5fcc703a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24038484-0000-0100-0000-60af288c0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:15.737088Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2168' + - '2264' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:35 GMT + - Thu, 27 May 2021 05:05:17 GMT expires: - '-1' pragma: @@ -3352,28 +3133,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000401-0000-0100-0000-5fcc703a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24038484-0000-0100-0000-60af288c0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:15.737088Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2168' + - '2264' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:37 GMT + - Thu, 27 May 2021 05:05:19 GMT expires: - '-1' pragma: @@ -3407,28 +3188,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --log-levels User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000401-0000-0100-0000-5fcc703a0000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Debug","Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24038484-0000-0100-0000-60af288c0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:15.737088Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2168' + - '2264' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:40 GMT + - Thu, 27 May 2021 05:05:19 GMT expires: - '-1' pragma: @@ -3451,14 +3232,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3477,34 +3257,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1767' + - '1627' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --log-levels User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000501-0000-0100-0000-5fcc70410000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403d884-0000-0100-0000-60af28910000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:20.8260998Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2160' + - '2257' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:41 GMT + - Thu, 27 May 2021 05:05:21 GMT expires: - '-1' pragma: @@ -3540,28 +3320,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000501-0000-0100-0000-5fcc70410000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"},{"streams":["Microsoft-Syslog"],"facilityNames":["cron"],"logLevels":["Critical","Emergency"],"name":"cronSyslog"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"2403d884-0000-0100-0000-60af28910000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:20.8260998Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2160' + - '2257' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:42 GMT + - Thu, 27 May 2021 05:05:24 GMT expires: - '-1' pragma: @@ -3584,14 +3364,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3609,34 +3388,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1643' + - '1503' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000601-0000-0100-0000-5fcc70430000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24031385-0000-0100-0000-60af28940000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:24.3388454Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:43 GMT + - Thu, 27 May 2021 05:05:25 GMT expires: - '-1' pragma: @@ -3654,7 +3433,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '58' + - '59' status: code: 200 message: OK @@ -3672,28 +3451,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000601-0000-0100-0000-5fcc70430000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24031385-0000-0100-0000-60af28940000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:24.3388454Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2045' + - '2142' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:45 GMT + - Thu, 27 May 2021 05:05:27 GMT expires: - '-1' pragma: @@ -3716,14 +3495,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3742,34 +3520,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1918' + - '1778' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --name --resource-id User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000701-0000-0100-0000-5fcc70460000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24032c85-0000-0100-0000-60af28980000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:27.6480313Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:46 GMT + - Thu, 27 May 2021 05:05:28 GMT expires: - '-1' pragma: @@ -3787,7 +3565,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '57' + - '59' status: code: 200 message: OK @@ -3805,28 +3583,28 @@ interactions: ParameterSetName: - --rule-name --resource-group --destinations --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000701-0000-0100-0000-5fcc70460000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24032c85-0000-0100-0000-60af28980000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:27.6480313Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2369' + - '2466' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:46 GMT + - Thu, 27 May 2021 05:05:29 GMT expires: - '-1' pragma: @@ -3849,14 +3627,13 @@ interactions: - request: body: '{"location": "eastus", "tags": {"tag1": "A", "tag2": "B", "tag3": "C"}, "properties": {"dataSources": {"performanceCounters": [{"streams": ["Microsoft-Perf"], - "scheduledTransferPeriod": "PT1M", "samplingFrequencyInSeconds": 15, "counterSpecifiers": - ["\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free - Megabytes", "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, - {"streams": ["Microsoft-Perf"], "scheduledTransferPeriod": "PT5M", "samplingFrequencyInSeconds": - 30, "counterSpecifiers": ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], - "windowsEventLogs": [{"streams": ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": - "PT1M", "xPathQueries": ["Security!"], "name": "cloudSecurityTeamEvents"}, {"streams": - ["Microsoft-WindowsEvent"], "scheduledTransferPeriod": "PT5M", "xPathQueries": + "samplingFrequencyInSeconds": 15, "counterSpecifiers": ["\\Processor(_Total)\\% + Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes", + "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"], "name": "cloudTeamCoreCounters"}, + {"streams": ["Microsoft-Perf"], "samplingFrequencyInSeconds": 30, "counterSpecifiers": + ["\\Process(_Total)\\Thread Count"], "name": "appTeamExtraCounters"}], "windowsEventLogs": + [{"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["Security!"], "name": + "cloudSecurityTeamEvents"}, {"streams": ["Microsoft-WindowsEvent"], "xPathQueries": ["System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"], "name": "appTeam1AppEvents"}], "syslog": [{"streams": ["Microsoft-Syslog"], "facilityNames": ["syslog"], "logLevels": @@ -3876,34 +3653,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1993' + - '1853' Content-Type: - application/json ParameterSetName: - --rule-name --resource-group --destinations --streams User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]},{"streams":["Microsoft-Perf"],"destinations":["clitest000003"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000801-0000-0100-0000-5fcc70480000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]},{"streams":["Microsoft-Perf"],"destinations":["clitest000003"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24035685-0000-0100-0000-60af289a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:29.7720549Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2440' + - '2537' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:48 GMT + - Thu, 27 May 2021 05:05:30 GMT expires: - '-1' pragma: @@ -3921,7 +3698,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '59' + - '58' status: code: 200 message: OK @@ -3939,28 +3716,28 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: - string: '{"properties":{"immutableId":"dcr-7f8a544c421740ed918aa2c25e621c18","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT1M","samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% + string: '{"properties":{"immutableId":"dcr-2ca3bc8e5ae947f2abc7321f84473831","dataSources":{"performanceCounters":[{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":15,"counterSpecifiers":["\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. - Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"scheduledTransferPeriod":"PT5M","samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread - Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT1M","xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"scheduledTransferPeriod":"PT5M","xPathQueries":["System![System[(Level + Disk Queue Length"],"name":"cloudTeamCoreCounters"},{"streams":["Microsoft-Perf"],"samplingFrequencyInSeconds":30,"counterSpecifiers":["\\Process(_Total)\\Thread + Count"],"name":"appTeamExtraCounters"}],"windowsEventLogs":[{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["Security!"],"name":"cloudSecurityTeamEvents"},{"streams":["Microsoft-WindowsEvent"],"xPathQueries":["System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level - = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"0c25a664-0a09-4c35-8c73-b5a83cad7d71","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"5d339633-eb2e-4d42-a54c-333ff72434b7","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]},{"streams":["Microsoft-Perf"],"destinations":["clitest000003"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"00000801-0000-0100-0000-5fcc70480000\""}' + = 2 or Level = 3)]]"],"name":"appTeam1AppEvents"}],"syslog":[{"streams":["Microsoft-Syslog"],"facilityNames":["syslog"],"logLevels":["Alert","Critical","Emergency"],"name":"syslogBase"}]},"destinations":{"logAnalytics":[{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000002","workspaceId":"e1f3c979-79c2-4132-95eb-ef451a1d189b","name":"clitest000002"},{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.operationalinsights/workspaces/clitest000003","workspaceId":"54976f20-00d4-4abf-a6b6-fcf82ee13639","name":"clitest000003"}]},"dataFlows":[{"streams":["Microsoft-Perf","Microsoft-Syslog","Microsoft-WindowsEvent"],"destinations":["clitest000002"]},{"streams":["Microsoft-Perf"],"destinations":["clitest000003"]}],"provisioningState":"Succeeded"},"location":"eastus","tags":{"tag1":"A","tag2":"B","tag3":"C"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule","name":"myCollectionRule","type":"Microsoft.Insights/dataCollectionRules","etag":"\"24035685-0000-0100-0000-60af289a0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:04:21.728359Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:29.7720549Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '2440' + - '2537' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:50 GMT + - Thu, 27 May 2021 05:05:32 GMT expires: - '-1' pragma: @@ -3998,23 +3775,23 @@ interactions: ParameterSetName: - --name --rule-id --resource User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2021-04-01 response: body: - string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"0800fc04-0000-0700-0000-5fcc704c0000\""}' + string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"1101db03-0000-0700-0000-60af289e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:05:33.46805Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:33.46805Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '654' + - '880' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:52 GMT + - Thu, 27 May 2021 05:05:34 GMT expires: - '-1' pragma: @@ -4050,23 +3827,23 @@ interactions: ParameterSetName: - --name --resource User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2021-04-01 response: body: - string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"0800fc04-0000-0700-0000-5fcc704c0000\""}' + string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"1101db03-0000-0700-0000-60af289e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:05:33.46805Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:33.46805Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '654' + - '880' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:54 GMT + - Thu, 27 May 2021 05:05:36 GMT expires: - '-1' pragma: @@ -4100,15 +3877,15 @@ interactions: ParameterSetName: - --rule-name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule/associations?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule/associations?api-version=2021-04-01 response: body: string: '{"value":[{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.insights/datacollectionrules/mycollectionrule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/microsoft.compute/virtualmachines/vm1/providers/microsoft.insights/datacollectionruleassociations/myassociation","name":"myassociation","type":"Microsoft.Insights/dataCollectionRuleAssociations"}],"nextLink":null}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: @@ -4116,7 +3893,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:57 GMT + - Thu, 27 May 2021 05:05:38 GMT expires: - '-1' pragma: @@ -4150,23 +3927,23 @@ interactions: ParameterSetName: - --resource User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations?api-version=2021-04-01 response: body: - string: '{"value":[{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"0800fc04-0000-0700-0000-5fcc704c0000\""}],"nextLink":null}' + string: '{"value":[{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"1101db03-0000-0700-0000-60af289e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:05:33.46805Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:33.46805Z"}}],"nextLink":null}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '682' + - '908' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:46:58 GMT + - Thu, 27 May 2021 05:05:39 GMT expires: - '-1' pragma: @@ -4200,23 +3977,23 @@ interactions: ParameterSetName: - --name --resource --description User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2021-04-01 response: body: - string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"0800fc04-0000-0700-0000-5fcc704c0000\""}' + string: '{"properties":{"dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"1101db03-0000-0700-0000-60af289e0000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:05:33.46805Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:33.46805Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '654' + - '880' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:47:00 GMT + - Thu, 27 May 2021 05:05:41 GMT expires: - '-1' pragma: @@ -4255,23 +4032,23 @@ interactions: ParameterSetName: - --name --resource --description User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2021-04-01 response: body: - string: '{"properties":{"description":"this is description","dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"08000405-0000-0700-0000-5fcc70560000\""}' + string: '{"properties":{"description":"this is description","dataCollectionRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation","name":"myAssociation","type":"Microsoft.Insights/dataCollectionRuleAssociations","etag":"\"1101df05-0000-0700-0000-60af28a60000\"","systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2021-05-27T05:05:41.8700929Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-05-27T05:05:41.8700929Z"}}' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - - '690' + - '920' content-type: - application/json; charset=utf-8 date: - - Sun, 06 Dec 2020 05:47:01 GMT + - Thu, 27 May 2021 05:05:42 GMT expires: - '-1' pragma: @@ -4309,21 +4086,21 @@ interactions: ParameterSetName: - -y --name --resource User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2021-04-01 response: body: string: '' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Sun, 06 Dec 2020 05:47:05 GMT + - Thu, 27 May 2021 05:05:44 GMT expires: - '-1' pragma: @@ -4357,21 +4134,21 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.15.1 azsdk-python-monitorclient/unknown Python/3.8.5 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.0 azsdk-python-mgmt-monitor/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2019-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule?api-version=2021-04-01 response: body: string: '' headers: api-supported-versions: - - 2019-11-01-preview + - 2019-11-01-preview, 2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Sun, 06 Dec 2020 05:47:11 GMT + - Thu, 27 May 2021 05:05:50 GMT expires: - '-1' pragma: diff --git a/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario.py b/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario.py index fbc3d97ab1c..07532a37ed4 100644 --- a/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario.py +++ b/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario.py @@ -8,28 +8,88 @@ # regenerated. # -------------------------------------------------------------------------- -import os from azure.cli.testsdk import ScenarioTest from azure.cli.testsdk import ResourceGroupPreparer -from .example_steps import step_data_collection_rule_show -from .example_steps import step_data_collection_rule_list_by_resource_group -from .example_steps import step_data_collection_rule_list_by_subscription -from .example_steps import step_data_collection_rule_association_create -from .example_steps import step_data_collection_rule_association_show -from .example_steps import step_data_collection_rule_association_list_by_rule -from .example_steps import step_data_collection_rule_association_list_by_resource -from .example_steps import step_data_collection_rule_association_delete -from .example_steps import step_data_collection_rule_delete -from .. import ( - try_manual, - raise_if, - calc_coverage -) - -TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) - - -@try_manual + + +def step_data_collection_rule_show(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule show ' + '--name "{myDataCollectionRule}" ' + '--resource-group "{rg}"', + checks=checks) + + +def step_data_collection_rule_list_by_resource_group(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule list ' + '--resource-group "{rg}"', + checks=checks) + + +def step_data_collection_rule_list_by_subscription(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule list ', + checks=checks) + + +def step_data_collection_rule_association_create(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule association create ' + '--name "{myAssociation}" ' + '--rule-id "{rule_id}" ' + '--resource "{vm_id}"', + checks=checks) + + +def step_data_collection_rule_association_show(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule association show ' + '--name "{myAssociation}" ' + '--resource "{vm_id}"', + checks=checks) + + +def step_data_collection_rule_association_list_by_rule(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule association list ' + '--rule-name "{myDataCollectionRule}" ' + '--resource-group "{rg}"', + checks=checks) + + +def step_data_collection_rule_association_list_by_resource(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule association list ' + '--resource "{vm_id}" ', + checks=checks) + + +def step_data_collection_rule_association_delete(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule association delete -y ' + '--name "{myAssociation}" ' + '--resource "{vm_id}" ', + checks=checks) + + +def step_data_collection_rule_delete(test, _, checks=None): + if checks is None: + checks = [] + test.cmd('az monitor data-collection rule delete -y ' + '--name "{myDataCollectionRule}" ' + '--resource-group "{rg}"', + checks=checks) + + def step_data_collection_rule_create(test, rg, checks=None): if checks is None: checks = [] @@ -42,15 +102,15 @@ def step_data_collection_rule_create(test, rg, checks=None): ')\\\\% Processor Time" counter-specifiers="\\\\Memory\\\\Committed Bytes" ' 'counter-specifiers="\\\\LogicalDisk(_Total)\\\\Free Megabytes" ' 'counter-specifiers="\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" ' - 'sampling-frequency=15 transfer-period="PT1M" streams="Microsoft-Perf" ' + 'sampling-frequency=15 streams="Microsoft-Perf" ' '--performance-counters name="appTeamExtraCounters" ' 'counter-specifiers="\\\\Process(_Total)\\\\Thread Count" sampling-frequency=30 ' - 'transfer-period="PT5M" streams="Microsoft-Perf" ' + 'streams="Microsoft-Perf" ' '--syslog name="syslogBase" facility-names="syslog" log-levels="Alert" log-levels="Critical" ' 'log-levels="Emergency" streams="Microsoft-Syslog" ' - '--windows-event-logs name="cloudSecurityTeamEvents" transfer-period="PT1M" ' + '--windows-event-logs name="cloudSecurityTeamEvents" ' 'streams="Microsoft-WindowsEvent" x-path-queries="Security!" ' - '--windows-event-logs name="appTeam1AppEvents" transfer-period="PT5M" ' + '--windows-event-logs name="appTeam1AppEvents" ' 'streams="Microsoft-WindowsEvent" ' 'x-path-queries="System![System[(Level = 1 or Level = 2 or Level = 3)]]" ' 'x-path-queries="Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" ', @@ -58,7 +118,6 @@ def step_data_collection_rule_create(test, rg, checks=None): test.kwargs['rule_id'] = rule_json['id'] -@try_manual def step_data_collection_rule_update_tags(test, rg, checks=None): if checks is None: checks = [] @@ -74,7 +133,6 @@ def step_data_collection_rule_update_tags(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_log_analytics_add(test, rg, checks=None): if checks is None: checks = [] @@ -87,7 +145,6 @@ def step_data_collection_rule_log_analytics_add(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_log_analytics_list(test, rg, checks=None): if checks is None: checks = [] @@ -98,7 +155,6 @@ def step_data_collection_rule_log_analytics_list(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_log_analytics_show(test, rg, checks=None): if checks is None: checks = [] @@ -110,7 +166,6 @@ def step_data_collection_rule_log_analytics_show(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_log_analytics_update(test, rg, checks=None): if checks is None: checks = [] @@ -123,7 +178,6 @@ def step_data_collection_rule_log_analytics_update(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_log_analytics_delete(test, rg, checks=None): if checks is None: checks = [] @@ -135,7 +189,6 @@ def step_data_collection_rule_log_analytics_delete(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_data_flow_list(test, rg, checks=None): if checks is None: checks = [] @@ -146,7 +199,6 @@ def step_data_collection_rule_data_flow_list(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_data_flow_add(test, rg, checks=None): if checks is None: checks = [] @@ -157,7 +209,6 @@ def step_data_collection_rule_data_flow_add(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_performance_counter_add(test, rg, checks=None): if checks is None: checks = [] @@ -168,12 +219,10 @@ def step_data_collection_rule_performance_counter_add(test, rg, checks=None): '--name extraCounters ' '--counter-specifiers "\\\\Memory\\\\Committed Bytes" "\\\\Processor(_Total)\\\\% Processor Time" ' '--sampling-frequency 15 ' - '--transfer-period "PT1M" ' '--streams "Microsoft-Perf"', checks=checks) -@try_manual def step_data_collection_rule_performance_counter_list(test, rg, checks=None): if checks is None: checks = [] @@ -184,7 +233,6 @@ def step_data_collection_rule_performance_counter_list(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_performance_counter_show(test, rg, checks=None): if checks is None: checks = [] @@ -196,7 +244,6 @@ def step_data_collection_rule_performance_counter_show(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_performance_counter_update(test, rg, checks=None): if checks is None: checks = [] @@ -209,7 +256,6 @@ def step_data_collection_rule_performance_counter_update(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_performance_counter_delete(test, rg, checks=None): if checks is None: checks = [] @@ -221,7 +267,6 @@ def step_data_collection_rule_performance_counter_delete(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_windows_event_log_add(test, rg, checks=None): if checks is None: checks = [] @@ -230,14 +275,12 @@ def step_data_collection_rule_windows_event_log_add(test, rg, checks=None): '--rule-name "{myDataCollectionRule}" ' '--resource-group "{rg}" ' '--name extraEvents ' - '--transfer-period "PT1M" ' '--streams "Microsoft-WindowsEvent" ' '--x-path-queries "System![System[(Level = 1 or Level = 2 or Level = 3)]]" ' '"Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"', checks=checks) -@try_manual def step_data_collection_rule_windows_event_log_list(test, rg, checks=None): if checks is None: checks = [] @@ -248,7 +291,6 @@ def step_data_collection_rule_windows_event_log_list(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_windows_event_log_show(test, rg, checks=None): if checks is None: checks = [] @@ -260,7 +302,6 @@ def step_data_collection_rule_windows_event_log_show(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_windows_event_log_update(test, rg, checks=None): if checks is None: checks = [] @@ -273,7 +314,6 @@ def step_data_collection_rule_windows_event_log_update(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_windows_event_log_delete(test, rg, checks=None): if checks is None: checks = [] @@ -285,7 +325,6 @@ def step_data_collection_rule_windows_event_log_delete(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_syslog_add(test, rg, checks=None): if checks is None: checks = [] @@ -300,7 +339,6 @@ def step_data_collection_rule_syslog_add(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_syslog_list(test, rg, checks=None): if checks is None: checks = [] @@ -311,7 +349,6 @@ def step_data_collection_rule_syslog_list(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_syslog_show(test, rg, checks=None): if checks is None: checks = [] @@ -323,7 +360,6 @@ def step_data_collection_rule_syslog_show(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_syslog_update(test, rg, checks=None): if checks is None: checks = [] @@ -336,7 +372,6 @@ def step_data_collection_rule_syslog_update(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_syslog_delete(test, rg, checks=None): if checks is None: checks = [] @@ -348,7 +383,6 @@ def step_data_collection_rule_syslog_delete(test, rg, checks=None): checks=checks) -@try_manual def step_data_collection_rule_association_update(test, rg, checks=None): if checks is None: checks = [] @@ -363,7 +397,6 @@ def step_data_collection_rule_association_update(test, rg, checks=None): # Env setup_scenario -@try_manual def setup_scenario(test, rg): test.kwargs.update({ 'rg': rg, @@ -395,16 +428,10 @@ def setup_scenario(test, rg): test.kwargs['vm_id'] = vm_json['id'] -# Env cleanup_scenario -@try_manual -def cleanup_scenario(test, rg): - pass - - # Testcase: Scenario -@try_manual def call_scenario(test, rg): setup_scenario(test, rg) + step_data_collection_rule_create(test, rg, checks=[ test.check("location", "{location}", case_sensitive=False), test.check("name", "{myDataCollectionRule}", case_sensitive=False), @@ -468,11 +495,9 @@ def call_scenario(test, rg): step_data_collection_rule_association_delete(test, rg, checks=[]) step_data_collection_rule_delete(test, rg, checks=[]) - cleanup_scenario(test, rg) # EXAMPLE: /DataCollectionRules/patch/Update data collection rule -@try_manual def step_data_collection_rule_update(test, rg, checks=None): if checks is None: checks = [] @@ -484,7 +509,6 @@ def step_data_collection_rule_update(test, rg, checks=None): # Test class for Scenario -@try_manual class Monitor_control_serviceScenarioTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='clitestmonitor_control_service_myResourceGroup'[:7], key='rg', @@ -500,5 +524,37 @@ def test_monitor_control_service_Scenario(self, rg): }) call_scenario(self, rg) - calc_coverage(__file__) - raise_if() + + @ResourceGroupPreparer(name_prefix='clitest_amcs_endpoints', location='eastus2euap') + def test_amcs_data_collection_endpoint(self, resource_group): + self.kwargs.update({ + 'rg': resource_group, + 'name1': 'endpoint1', + 'name2': 'endpoint2', + }) + + self.cmd('monitor data-collection endpoint create -g {rg} -n {name1} --public-network-access disabled', checks=[ + self.check('networkAcls.publicNetworkAccess', 'Disabled'), + ]) + + self.cmd('monitor data-collection endpoint update -g {rg} -n {name1} --public-network-access enabled ' + '--kind windows', checks=[ + self.check('networkAcls.publicNetworkAccess', 'Enabled'), + self.check('kind', 'Windows') + ]) + + self.cmd('monitor data-collection endpoint create -g {rg} -n {name2} ' + '--public-network-access enabled --kind linux') + self.cmd('monitor data-collection endpoint show -g {rg} -n {name2}', checks=[ + self.check('networkAcls.publicNetworkAccess', 'Enabled'), + self.check('kind', 'Linux') + ]) + + self.cmd('monitor data-collection endpoint list -g {rg}', checks=[ + self.check('length(@)', 2) + ]) + + self.cmd('monitor data-collection endpoint delete -g {rg} -n {name2} -y') + self.cmd('monitor data-collection endpoint list -g {rg}', checks=[ + self.check('length(@)', 1) + ]) diff --git a/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario_coverage.md b/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario_coverage.md deleted file mode 100644 index f58c5281d8f..00000000000 --- a/src/monitor-control-service/azext_amcs/tests/latest/test_monitor_control_service_scenario_coverage.md +++ /dev/null @@ -1,36 +0,0 @@ -|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| -|step_data_collection_rule_create|successed||||2020-12-06 06:19:33.430101|2020-12-06 06:19:33.875079| -|step_data_collection_rule_show|successed||||2020-12-06 06:19:33.875079|2020-12-06 06:19:34.030414| -|step_data_collection_rule_list_by_resource_group|successed||||2020-12-06 06:19:34.030414|2020-12-06 06:19:34.181268| -|step_data_collection_rule_list_by_subscription|successed||||2020-12-06 06:19:34.181268|2020-12-06 06:19:34.382711| -|step_data_collection_rule_update_tags|successed||||2020-12-06 06:19:34.382711|2020-12-06 06:19:34.553738| -|step_data_collection_rule_log_analytics_add|successed||||2020-12-06 06:19:38.331945|2020-12-06 06:19:38.534172| -|step_data_collection_rule_log_analytics_list|successed||||2020-12-06 06:19:34.773959|2020-12-06 06:19:34.952407| -|step_data_collection_rule_log_analytics_show|successed||||2020-12-06 06:19:34.952407|2020-12-06 06:19:35.097624| -|step_data_collection_rule_log_analytics_update|successed||||2020-12-06 06:19:35.097624|2020-12-06 06:19:35.269941| -|step_data_collection_rule_log_analytics_delete|successed||||2020-12-06 06:19:35.269941|2020-12-06 06:19:35.435925| -|step_data_collection_rule_performance_counter_add|successed||||2020-12-06 06:19:35.435925|2020-12-06 06:19:35.600317| -|step_data_collection_rule_performance_counter_list|successed||||2020-12-06 06:19:35.600317|2020-12-06 06:19:35.758440| -|step_data_collection_rule_performance_counter_show|successed||||2020-12-06 06:19:35.758440|2020-12-06 06:19:35.929409| -|step_data_collection_rule_performance_counter_update|successed||||2020-12-06 06:19:35.929409|2020-12-06 06:19:36.094490| -|step_data_collection_rule_performance_counter_delete|successed||||2020-12-06 06:19:36.102476|2020-12-06 06:19:36.286495| -|step_data_collection_rule_windows_event_log_add|successed||||2020-12-06 06:19:36.286495|2020-12-06 06:19:36.470242| -|step_data_collection_rule_windows_event_log_list|successed||||2020-12-06 06:19:36.470242|2020-12-06 06:19:36.637700| -|step_data_collection_rule_windows_event_log_show|successed||||2020-12-06 06:19:36.637700|2020-12-06 06:19:36.824072| -|step_data_collection_rule_windows_event_log_update|successed||||2020-12-06 06:19:36.824072|2020-12-06 06:19:37.036132| -|step_data_collection_rule_windows_event_log_delete|successed||||2020-12-06 06:19:37.036132|2020-12-06 06:19:37.253954| -|step_data_collection_rule_syslog_add|successed||||2020-12-06 06:19:37.253954|2020-12-06 06:19:37.464321| -|step_data_collection_rule_syslog_list|successed||||2020-12-06 06:19:37.464321|2020-12-06 06:19:37.650559| -|step_data_collection_rule_syslog_show|successed||||2020-12-06 06:19:37.650559|2020-12-06 06:19:37.935204| -|step_data_collection_rule_syslog_update|successed||||2020-12-06 06:19:37.935204|2020-12-06 06:19:38.127402| -|step_data_collection_rule_syslog_delete|successed||||2020-12-06 06:19:38.127402|2020-12-06 06:19:38.331945| -|step_data_collection_rule_data_flow_add|successed||||2020-12-06 06:19:38.536188|2020-12-06 06:19:38.733902| -|step_data_collection_rule_data_flow_list|successed||||2020-12-06 06:19:38.733902|2020-12-06 06:19:38.953767| -|step_data_collection_rule_association_create|successed||||2020-12-06 06:19:38.953767|2020-12-06 06:19:39.163916| -|step_data_collection_rule_association_show|successed||||2020-12-06 06:19:39.172325|2020-12-06 06:19:39.411240| -|step_data_collection_rule_association_list_by_rule|successed||||2020-12-06 06:19:39.411240|2020-12-06 06:19:39.611947| -|step_data_collection_rule_association_list_by_resource|successed||||2020-12-06 06:19:39.611947|2020-12-06 06:19:39.814270| -|step_data_collection_rule_association_update|successed||||2020-12-06 06:19:39.814270|2020-12-06 06:19:40.030964| -|step_data_collection_rule_association_delete|successed||||2020-12-06 06:19:40.030964|2020-12-06 06:19:40.240757| -|step_data_collection_rule_delete|successed||||2020-12-06 06:19:40.240757|2020-12-06 06:19:40.451782| -Coverage: 34/34 diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/__init__.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/__init__.py index fa63968b375..24b9752b325 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/__init__.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_client import MonitorClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorClient'] try: diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_configuration.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_configuration.py index e99ceac3dcf..c0ee9f1b265 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_configuration.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorClientConfiguration(Configuration): """Configuration for MonitorClient. @@ -47,9 +48,9 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-11-01-preview" + self.api_version = "2021-04-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'monitorclient/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_monitor_client.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_monitor_client.py index d8e2038c2d4..71e40774c68 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_monitor_client.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_monitor_client.py @@ -18,6 +18,7 @@ from azure.core.credentials import TokenCredential from ._configuration import MonitorClientConfiguration +from .operations import DataCollectionEndpointsOperations from .operations import DataCollectionRuleAssociationsOperations from .operations import DataCollectionRulesOperations from . import models @@ -26,10 +27,12 @@ class MonitorClient(object): """Monitor Management Client. + :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations + :vartype data_collection_endpoints: azure.mgmt.amcs.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations - :vartype data_collection_rule_associations: $(python-base-namespace).v2019_11_01_preview.operations.DataCollectionRuleAssociationsOperations + :vartype data_collection_rule_associations: azure.mgmt.amcs.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations - :vartype data_collection_rules: $(python-base-namespace).v2019_11_01_preview.operations.DataCollectionRulesOperations + :vartype data_collection_rules: azure.mgmt.amcs.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -55,6 +58,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.data_collection_endpoints = DataCollectionEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) self.data_collection_rule_associations = DataCollectionRuleAssociationsOperations( self._client, self._config, self._serialize, self._deserialize) self.data_collection_rules = DataCollectionRulesOperations( diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_version.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/__init__.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/__init__.py new file mode 100644 index 00000000000..7096a59fbc1 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_configuration.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_configuration.py new file mode 100644 index 00000000000..a8be4b95105 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_monitor_client.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_monitor_client.py new file mode 100644 index 00000000000..acdee347a4f --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/_monitor_client.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import MonitorClientConfiguration +from .operations import DataCollectionEndpointsOperations +from .operations import DataCollectionRuleAssociationsOperations +from .operations import DataCollectionRulesOperations +from .. import models + + +class MonitorClient(object): + """Monitor Management Client. + + :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations + :vartype data_collection_endpoints: azure.mgmt.amcs.aio.operations.DataCollectionEndpointsOperations + :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations + :vartype data_collection_rule_associations: azure.mgmt.amcs.aio.operations.DataCollectionRuleAssociationsOperations + :ivar data_collection_rules: DataCollectionRulesOperations operations + :vartype data_collection_rules: azure.mgmt.amcs.aio.operations.DataCollectionRulesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.data_collection_endpoints = DataCollectionEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rule_associations = DataCollectionRuleAssociationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rules = DataCollectionRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/__init__.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/__init__.py new file mode 100644 index 00000000000..86676ba9262 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_collection_endpoints_operations import DataCollectionEndpointsOperations +from ._data_collection_rule_associations_operations import DataCollectionRuleAssociationsOperations +from ._data_collection_rules_operations import DataCollectionRulesOperations + +__all__ = [ + 'DataCollectionEndpointsOperations', + 'DataCollectionRuleAssociationsOperations', + 'DataCollectionRulesOperations', +] diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_endpoints_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_endpoints_operations.py new file mode 100644 index 00000000000..0a708d5565c --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_endpoints_operations.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionEndpointsOperations: + """DataCollectionEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.amcs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.DataCollectionEndpointResourceListResult"]: + """Lists all data collection endpoints in the specified resource group. + + Lists all data collection endpoints in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.DataCollectionEndpointResourceListResult"]: + """Lists all data collection endpoints in the specified subscription. + + Lists all data collection endpoints in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + async def get( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + **kwargs + ) -> "models.DataCollectionEndpointResource": + """Returns the specified data collection endpoint. + + Returns the specified data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def create( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + body: Optional["models.DataCollectionEndpointResource"] = None, + **kwargs + ) -> "models.DataCollectionEndpointResource": + """Creates or updates a data collection endpoint. + + Creates or updates a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionEndpointResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + body: Optional["models.ResourceForUpdate"] = None, + **kwargs + ) -> "models.DataCollectionEndpointResource": + """Updates part of a data collection endpoint. + + Updates part of a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + **kwargs + ) -> None: + """Deletes a data collection endpoint. + + Deletes a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rule_associations_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rule_associations_operations.py new file mode 100644 index 00000000000..3dc0eaeeada --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rule_associations_operations.py @@ -0,0 +1,384 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRuleAssociationsOperations: + """DataCollectionRuleAssociationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.amcs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource( + self, + resource_uri: str, + **kwargs + ) -> AsyncIterable["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: + """Lists associations for the specified resource. + + Lists associations for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations'} # type: ignore + + def list_by_rule( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs + ) -> AsyncIterable["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: + """Lists associations for the specified data collection rule. + + Lists associations for the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations'} # type: ignore + + async def get( + self, + resource_uri: str, + association_name: str, + **kwargs + ) -> "models.DataCollectionRuleAssociationProxyOnlyResource": + """Returns the specified association. + + Returns the specified association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + async def create( + self, + resource_uri: str, + association_name: str, + body: Optional["models.DataCollectionRuleAssociationProxyOnlyResource"] = None, + **kwargs + ) -> "models.DataCollectionRuleAssociationProxyOnlyResource": + """Creates or updates an association. + + Creates or updates an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleAssociationProxyOnlyResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + async def delete( + self, + resource_uri: str, + association_name: str, + **kwargs + ) -> None: + """Deletes an association. + + Deletes an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rules_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rules_operations.py new file mode 100644 index 00000000000..e7f9820120f --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/aio/operations/_data_collection_rules_operations.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRulesOperations: + """DataCollectionRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.amcs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.DataCollectionRuleResourceListResult"]: + """Lists all data collection rules in the specified resource group. + + Lists all data collection rules in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.DataCollectionRuleResourceListResult"]: + """Lists all data collection rules in the specified subscription. + + Lists all data collection rules in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + async def get( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs + ) -> "models.DataCollectionRuleResource": + """Returns the specified data collection rule. + + Returns the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def create( + self, + resource_group_name: str, + data_collection_rule_name: str, + body: Optional["models.DataCollectionRuleResource"] = None, + **kwargs + ) -> "models.DataCollectionRuleResource": + """Creates or updates a data collection rule. + + Creates or updates a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.DataCollectionRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + data_collection_rule_name: str, + body: Optional["models.ResourceForUpdate"] = None, + **kwargs + ) -> "models.DataCollectionRuleResource": + """Updates part of a data collection rule. + + Updates part of a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs + ) -> None: + """Deletes a data collection rule. + + Deletes a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/__init__.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/__init__.py index 0734551e38d..9e21704b867 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/__init__.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/__init__.py @@ -8,115 +8,151 @@ try: from ._models_py3 import AzureMonitorMetricsDestination + from ._models_py3 import ConfigurationAccessEndpointSpec + from ._models_py3 import DataCollectionEndpoint + from ._models_py3 import DataCollectionEndpointConfigurationAccess + from ._models_py3 import DataCollectionEndpointLogsIngestion + from ._models_py3 import DataCollectionEndpointNetworkAcls + from ._models_py3 import DataCollectionEndpointResource + from ._models_py3 import DataCollectionEndpointResourceListResult + from ._models_py3 import DataCollectionEndpointResourceProperties + from ._models_py3 import DataCollectionEndpointResourceSystemData from ._models_py3 import DataCollectionRule from ._models_py3 import DataCollectionRuleAssociation from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResource from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceListResult from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceProperties + from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceSystemData from ._models_py3 import DataCollectionRuleDataSources from ._models_py3 import DataCollectionRuleDestinations from ._models_py3 import DataCollectionRuleResource from ._models_py3 import DataCollectionRuleResourceListResult from ._models_py3 import DataCollectionRuleResourceProperties + from ._models_py3 import DataCollectionRuleResourceSystemData from ._models_py3 import DataFlow from ._models_py3 import DataSourcesSpec from ._models_py3 import DestinationsSpec from ._models_py3 import DestinationsSpecAzureMonitorMetrics from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDetails - from ._models_py3 import ErrorDetailsautogenerated + from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse - from ._models_py3 import ErrorResponseError - from ._models_py3 import ErrorResponseErrorautogenerated - from ._models_py3 import ErrorResponseautogenerated from ._models_py3 import ExtensionDataSource from ._models_py3 import LogAnalyticsDestination + from ._models_py3 import LogsIngestionEndpointSpec + from ._models_py3 import NetworkRuleSet from ._models_py3 import PerfCounterDataSource from ._models_py3 import ResourceForUpdate from ._models_py3 import SyslogDataSource + from ._models_py3 import SystemData from ._models_py3 import WindowsEventLogDataSource except (SyntaxError, ImportError): from ._models import AzureMonitorMetricsDestination # type: ignore + from ._models import ConfigurationAccessEndpointSpec # type: ignore + from ._models import DataCollectionEndpoint # type: ignore + from ._models import DataCollectionEndpointConfigurationAccess # type: ignore + from ._models import DataCollectionEndpointLogsIngestion # type: ignore + from ._models import DataCollectionEndpointNetworkAcls # type: ignore + from ._models import DataCollectionEndpointResource # type: ignore + from ._models import DataCollectionEndpointResourceListResult # type: ignore + from ._models import DataCollectionEndpointResourceProperties # type: ignore + from ._models import DataCollectionEndpointResourceSystemData # type: ignore from ._models import DataCollectionRule # type: ignore from ._models import DataCollectionRuleAssociation # type: ignore from ._models import DataCollectionRuleAssociationProxyOnlyResource # type: ignore from ._models import DataCollectionRuleAssociationProxyOnlyResourceListResult # type: ignore from ._models import DataCollectionRuleAssociationProxyOnlyResourceProperties # type: ignore + from ._models import DataCollectionRuleAssociationProxyOnlyResourceSystemData # type: ignore from ._models import DataCollectionRuleDataSources # type: ignore from ._models import DataCollectionRuleDestinations # type: ignore from ._models import DataCollectionRuleResource # type: ignore from ._models import DataCollectionRuleResourceListResult # type: ignore from ._models import DataCollectionRuleResourceProperties # type: ignore + from ._models import DataCollectionRuleResourceSystemData # type: ignore from ._models import DataFlow # type: ignore from ._models import DataSourcesSpec # type: ignore from ._models import DestinationsSpec # type: ignore from ._models import DestinationsSpecAzureMonitorMetrics # type: ignore from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDetails # type: ignore - from ._models import ErrorDetailsautogenerated # type: ignore + from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore - from ._models import ErrorResponseError # type: ignore - from ._models import ErrorResponseErrorautogenerated # type: ignore - from ._models import ErrorResponseautogenerated # type: ignore from ._models import ExtensionDataSource # type: ignore from ._models import LogAnalyticsDestination # type: ignore + from ._models import LogsIngestionEndpointSpec # type: ignore + from ._models import NetworkRuleSet # type: ignore from ._models import PerfCounterDataSource # type: ignore from ._models import ResourceForUpdate # type: ignore from ._models import SyslogDataSource # type: ignore + from ._models import SystemData # type: ignore from ._models import WindowsEventLogDataSource # type: ignore from ._monitor_client_enums import ( + CreatedByType, + KnownDataCollectionEndpointProvisioningState, + KnownDataCollectionEndpointResourceKind, KnownDataCollectionRuleAssociationProvisioningState, KnownDataCollectionRuleProvisioningState, + KnownDataCollectionRuleResourceKind, KnownDataFlowStreams, KnownExtensionDataSourceStreams, - KnownPerfCounterDataSourceScheduledTransferPeriod, KnownPerfCounterDataSourceStreams, + KnownPublicNetworkAccessOptions, KnownSyslogDataSourceFacilityNames, KnownSyslogDataSourceLogLevels, KnownSyslogDataSourceStreams, - KnownWindowsEventLogDataSourceScheduledTransferPeriod, KnownWindowsEventLogDataSourceStreams, ) __all__ = [ 'AzureMonitorMetricsDestination', + 'ConfigurationAccessEndpointSpec', + 'DataCollectionEndpoint', + 'DataCollectionEndpointConfigurationAccess', + 'DataCollectionEndpointLogsIngestion', + 'DataCollectionEndpointNetworkAcls', + 'DataCollectionEndpointResource', + 'DataCollectionEndpointResourceListResult', + 'DataCollectionEndpointResourceProperties', + 'DataCollectionEndpointResourceSystemData', 'DataCollectionRule', 'DataCollectionRuleAssociation', 'DataCollectionRuleAssociationProxyOnlyResource', 'DataCollectionRuleAssociationProxyOnlyResourceListResult', 'DataCollectionRuleAssociationProxyOnlyResourceProperties', + 'DataCollectionRuleAssociationProxyOnlyResourceSystemData', 'DataCollectionRuleDataSources', 'DataCollectionRuleDestinations', 'DataCollectionRuleResource', 'DataCollectionRuleResourceListResult', 'DataCollectionRuleResourceProperties', + 'DataCollectionRuleResourceSystemData', 'DataFlow', 'DataSourcesSpec', 'DestinationsSpec', 'DestinationsSpecAzureMonitorMetrics', 'ErrorAdditionalInfo', - 'ErrorDetails', - 'ErrorDetailsautogenerated', + 'ErrorDetail', 'ErrorResponse', - 'ErrorResponseError', - 'ErrorResponseErrorautogenerated', - 'ErrorResponseautogenerated', 'ExtensionDataSource', 'LogAnalyticsDestination', + 'LogsIngestionEndpointSpec', + 'NetworkRuleSet', 'PerfCounterDataSource', 'ResourceForUpdate', 'SyslogDataSource', + 'SystemData', 'WindowsEventLogDataSource', + 'CreatedByType', + 'KnownDataCollectionEndpointProvisioningState', + 'KnownDataCollectionEndpointResourceKind', 'KnownDataCollectionRuleAssociationProvisioningState', 'KnownDataCollectionRuleProvisioningState', + 'KnownDataCollectionRuleResourceKind', 'KnownDataFlowStreams', 'KnownExtensionDataSourceStreams', - 'KnownPerfCounterDataSourceScheduledTransferPeriod', 'KnownPerfCounterDataSourceStreams', + 'KnownPublicNetworkAccessOptions', 'KnownSyslogDataSourceFacilityNames', 'KnownSyslogDataSourceLogLevels', 'KnownSyslogDataSourceStreams', - 'KnownWindowsEventLogDataSourceScheduledTransferPeriod', 'KnownWindowsEventLogDataSourceStreams', ] diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models.py index c3c0b792f45..67d16f1882d 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models.py @@ -13,28 +13,442 @@ class AzureMonitorMetricsDestination(msrest.serialization.Model): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureMonitorMetricsDestination, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ConfigurationAccessEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for accessing configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationAccessEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpoint(msrest.serialization.Model): + """Definition of data collection endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpoint, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.immutable_id = kwargs.get('immutable_id', None) + self.configuration_access = kwargs.get('configuration_access', None) + self.logs_ingestion = kwargs.get('logs_ingestion', None) + self.network_acls = kwargs.get('network_acls', None) + self.provisioning_state = None + + +class DataCollectionEndpointConfigurationAccess(ConfigurationAccessEndpointSpec): + """The endpoint used by agents to access their configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointConfigurationAccess, self).__init__(**kwargs) + + +class LogsIngestionEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for ingesting logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogsIngestionEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpointLogsIngestion(LogsIngestionEndpointSpec): + """The endpoint used by clients to ingest logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointLogsIngestion, self).__init__(**kwargs) + + +class NetworkRuleSet(msrest.serialization.Model): + """Definition of the network rules. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.amcs.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.public_network_access = kwargs.get('public_network_access', None) + + +class DataCollectionEndpointNetworkAcls(NetworkRuleSet): + """Network access control rules for the endpoints. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.amcs.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointNetworkAcls, self).__init__(**kwargs) + + +class DataCollectionEndpointResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or ~azure.mgmt.amcs.models.KnownDataCollectionEndpointResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'properties.configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'properties.logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, **kwargs ): - super(AzureMonitorMetricsDestination, self).__init__(**kwargs) - self.name = kwargs['name'] + super(DataCollectionEndpointResource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.kind = kwargs.get('kind', None) + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = kwargs.get('description', None) + self.immutable_id = kwargs.get('immutable_id', None) + self.configuration_access = kwargs.get('configuration_access', None) + self.logs_ingestion = kwargs.get('logs_ingestion', None) + self.network_acls = kwargs.get('network_acls', None) + self.provisioning_state = None + + +class DataCollectionEndpointResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~azure.mgmt.amcs.models.DataCollectionEndpointResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionEndpointResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceProperties, self).__init__(**kwargs) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class DataCollectionEndpointResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceSystemData, self).__init__(**kwargs) class DataCollectionRule(msrest.serialization.Model): @@ -42,33 +456,32 @@ class DataCollectionRule(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, @@ -81,9 +494,10 @@ def __init__( ): super(DataCollectionRule, self).__init__(**kwargs) self.description = kwargs.get('description', None) + self.immutable_id = None self.data_sources = kwargs.get('data_sources', None) - self.destinations = kwargs['destinations'] - self.data_flows = kwargs['data_flows'] + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) self.provisioning_state = None @@ -92,28 +506,28 @@ class DataCollectionRuleAssociation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -123,7 +537,8 @@ def __init__( ): super(DataCollectionRuleAssociation, self).__init__(**kwargs) self.description = kwargs.get('description', None) - self.data_collection_rule_id = kwargs['data_collection_rule_id'] + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) + self.data_collection_endpoint_id = kwargs.get('data_collection_endpoint_id', None) self.provisioning_state = None @@ -132,8 +547,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -142,15 +555,20 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) :vartype type: str :ivar etag: Resource entity tag (ETag). :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -158,8 +576,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -168,8 +585,10 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'properties.dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'properties.dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -182,8 +601,10 @@ def __init__( self.name = None self.type = None self.etag = None + self.system_data = None self.description = kwargs.get('description', None) - self.data_collection_rule_id = kwargs['data_collection_rule_id'] + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) + self.data_collection_endpoint_id = kwargs.get('data_collection_endpoint_id', None) self.provisioning_state = None @@ -193,8 +614,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serializat All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + :type value: list[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -222,28 +642,28 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -254,20 +674,52 @@ def __init__( super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(**kwargs) +class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceSystemData, self).__init__(**kwargs) + + class DataSourcesSpec(msrest.serialization.Model): """Specification of data sources that will be collected. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: list[~azure.mgmt.amcs.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: list[~azure.mgmt.amcs.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. - :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :type syslog: list[~azure.mgmt.amcs.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: list[~azure.mgmt.amcs.models.ExtensionDataSource] """ _attribute_map = { @@ -293,16 +745,13 @@ class DataCollectionRuleDataSources(DataSourcesSpec): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: list[~azure.mgmt.amcs.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: list[~azure.mgmt.amcs.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. - :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :type syslog: list[~azure.mgmt.amcs.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: list[~azure.mgmt.amcs.models.ExtensionDataSource] """ _attribute_map = { @@ -323,11 +772,9 @@ class DestinationsSpec(msrest.serialization.Model): """Specification of destinations that can be used in data flows. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: list[~azure.mgmt.amcs.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: ~azure.mgmt.amcs.models.AzureMonitorMetricsDestination """ _attribute_map = { @@ -348,11 +795,9 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: list[~azure.mgmt.amcs.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: ~azure.mgmt.amcs.models.AzureMonitorMetricsDestination """ _attribute_map = { @@ -378,6 +823,8 @@ class DataCollectionRuleResource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or ~azure.mgmt.amcs.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -386,20 +833,24 @@ class DataCollectionRuleResource(msrest.serialization.Model): :vartype type: str :ivar etag: Resource entity tag (ETag). :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -408,20 +859,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'system_data': {'readonly': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, 'data_sources': {'key': 'properties.dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'properties.destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, @@ -435,14 +888,17 @@ def __init__( super(DataCollectionRuleResource, self).__init__(**kwargs) self.location = kwargs['location'] self.tags = kwargs.get('tags', None) + self.kind = kwargs.get('kind', None) self.id = None self.name = None self.type = None self.etag = None + self.system_data = None self.description = kwargs.get('description', None) + self.immutable_id = None self.data_sources = kwargs.get('data_sources', None) - self.destinations = kwargs['destinations'] - self.data_flows = kwargs['data_flows'] + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) self.provisioning_state = None @@ -452,8 +908,7 @@ class DataCollectionRuleResourceListResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + :type value: list[~azure.mgmt.amcs.models.DataCollectionRuleResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -481,33 +936,32 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, @@ -521,23 +975,50 @@ def __init__( super(DataCollectionRuleResourceProperties, self).__init__(**kwargs) +class DataCollectionRuleResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleResourceSystemData, self).__init__(**kwargs) + + class DataFlow(msrest.serialization.Model): """Definition of which streams are sent to which destinations. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams for this data flow. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataFlowStreams] - :param destinations: Required. List of destinations for this data flow. + :param streams: List of streams for this data flow. + :type streams: list[str or ~azure.mgmt.amcs.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. :type destinations: list[str] """ - _validation = { - 'streams': {'required': True}, - 'destinations': {'required': True}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'destinations': {'key': 'destinations', 'type': '[str]'}, @@ -548,25 +1029,19 @@ def __init__( **kwargs ): super(DataFlow, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.destinations = kwargs['destinations'] + self.streams = kwargs.get('streams', None) + self.destinations = kwargs.get('destinations', None) class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -579,7 +1054,7 @@ def __init__( class ErrorAdditionalInfo(msrest.serialization.Model): - """Additional information for common error response. + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. @@ -608,71 +1083,21 @@ def __init__( self.info = None -class ErrorDetails(msrest.serialization.Model): - """Common error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorDetailsautogenerated(msrest.serialization.Model): - """Common error details. +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code which can be used to programmatically identify the class of error. + :ivar code: The error code. :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. + :ivar message: The error message. :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). + :ivar target: The error target. :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] + :ivar details: The error details. + :vartype details: list[~azure.mgmt.amcs.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.amcs.models.ErrorAdditionalInfo] """ _validation = { @@ -687,7 +1112,7 @@ class ErrorDetailsautogenerated(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsautogenerated]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -695,7 +1120,7 @@ def __init__( self, **kwargs ): - super(ErrorDetailsautogenerated, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -704,20 +1129,14 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails + :param error: The error object. + :type error: ~azure.mgmt.amcs.models.ErrorDetail """ - _validation = { - 'error': {'readonly': True}, - } - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( @@ -725,117 +1144,7 @@ def __init__( **kwargs ): super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseautogenerated(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetailsautogenerated'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseautogenerated, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetails): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) - - -class ErrorResponseErrorautogenerated(ErrorDetailsautogenerated): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsautogenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseErrorautogenerated, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ExtensionDataSource(msrest.serialization.Model): @@ -844,32 +1153,32 @@ class ExtensionDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + :type streams: list[str or ~azure.mgmt.amcs.models.KnownExtensionDataSourceStreams] :param extension_name: Required. The name of the VM extension. :type extension_name: str :param extension_settings: The extension settings. The format is specific for particular extension. :type extension_settings: object - :param name: Required. A friendly name for the data source. + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'streams': {'required': True}, - 'extension_name': {'required': True, 'max_length': 64, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'extension_name': {'required': True}, } _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'extension_name': {'key': 'extensionName', 'type': 'str'}, 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -878,32 +1187,35 @@ def __init__( **kwargs ): super(ExtensionDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] + self.streams = kwargs.get('streams', None) self.extension_name = kwargs['extension_name'] self.extension_settings = kwargs.get('extension_settings', None) - self.name = kwargs['name'] + self.input_data_sources = kwargs.get('input_data_sources', None) + self.name = kwargs.get('name', None) class LogAnalyticsDestination(msrest.serialization.Model): """Log Analytics destination. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param workspace_resource_id: Required. The resource ID of the Log Analytics workspace. + :param workspace_resource_id: The resource ID of the Log Analytics workspace. :type workspace_resource_id: str - :param name: Required. A friendly name for the destination. + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'workspace_resource_id': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'workspace_id': {'readonly': True}, } _attribute_map = { 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -912,51 +1224,35 @@ def __init__( **kwargs ): super(LogAnalyticsDestination, self).__init__(**kwargs) - self.workspace_resource_id = kwargs['workspace_resource_id'] - self.name = kwargs['name'] + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.workspace_id = None + self.name = kwargs.get('name', None) class PerfCounterDataSource(msrest.serialization.Model): """Definition of which performance counters will be collected and how they will be collected by this data collection rule. Collected from both Windows and Linux machines where the counter is present. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceScheduledTransferPeriod - :param sampling_frequency_in_seconds: Required. The number of seconds between consecutive - counter measurements (samples). + :type streams: list[str or ~azure.mgmt.amcs.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). :type sampling_frequency_in_seconds: int - :param counter_specifiers: Required. A list of specifier names of the performance counters you - want to collect. + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'. :type counter_specifiers: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'sampling_frequency_in_seconds': {'required': True, 'maximum': 30, 'minimum': 1}, - 'counter_specifiers': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, @@ -967,11 +1263,10 @@ def __init__( **kwargs ): super(PerfCounterDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.scheduled_transfer_period = kwargs['scheduled_transfer_period'] - self.sampling_frequency_in_seconds = kwargs['sampling_frequency_in_seconds'] - self.counter_specifiers = kwargs['counter_specifiers'] - self.name = kwargs['name'] + self.streams = kwargs.get('streams', None) + self.sampling_frequency_in_seconds = kwargs.get('sampling_frequency_in_seconds', None) + self.counter_specifiers = kwargs.get('counter_specifiers', None) + self.name = kwargs.get('name', None) class ResourceForUpdate(msrest.serialization.Model): @@ -997,31 +1292,20 @@ class SyslogDataSource(msrest.serialization.Model): """Definition of which syslog data will be collected and how it will be collected. Only collected from Linux machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] - :param facility_names: Required. The list of facility names. - :type facility_names: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + :type streams: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceFacilityNames] :param log_levels: The log levels to collect. - :type log_levels: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] - :param name: Required. A friendly name for the data source. + :type log_levels: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'facility_names': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, @@ -1034,46 +1318,30 @@ def __init__( **kwargs ): super(SyslogDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.facility_names = kwargs['facility_names'] + self.streams = kwargs.get('streams', None) + self.facility_names = kwargs.get('facility_names', None) self.log_levels = kwargs.get('log_levels', None) - self.name = kwargs['name'] + self.name = kwargs.get('name', None) class WindowsEventLogDataSource(msrest.serialization.Model): """Definition of which Windows Event Log events will be collected and how they will be collected. Only collected from Windows machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceScheduledTransferPeriod - :param x_path_queries: Required. A list of Windows Event Log queries in XPATH format. + :type streams: list[str or ~azure.mgmt.amcs.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. :type x_path_queries: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'x_path_queries': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -1083,7 +1351,6 @@ def __init__( **kwargs ): super(WindowsEventLogDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.scheduled_transfer_period = kwargs['scheduled_transfer_period'] - self.x_path_queries = kwargs['x_path_queries'] - self.name = kwargs['name'] + self.streams = kwargs.get('streams', None) + self.x_path_queries = kwargs.get('x_path_queries', None) + self.name = kwargs.get('name', None) diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py index c421746d54b..00b4d7984c3 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import datetime from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError @@ -17,30 +18,486 @@ class AzureMonitorMetricsDestination(msrest.serialization.Model): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(AzureMonitorMetricsDestination, self).__init__(**kwargs) + self.name = name + + +class ConfigurationAccessEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for accessing configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationAccessEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpoint(msrest.serialization.Model): + """Definition of data collection endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["ConfigurationAccessEndpointSpec"] = None, + logs_ingestion: Optional["LogsIngestionEndpointSpec"] = None, + network_acls: Optional["NetworkRuleSet"] = None, + **kwargs + ): + super(DataCollectionEndpoint, self).__init__(**kwargs) + self.description = description + self.immutable_id = immutable_id + self.configuration_access = configuration_access + self.logs_ingestion = logs_ingestion + self.network_acls = network_acls + self.provisioning_state = None + + +class DataCollectionEndpointConfigurationAccess(ConfigurationAccessEndpointSpec): + """The endpoint used by agents to access their configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointConfigurationAccess, self).__init__(**kwargs) + + +class LogsIngestionEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for ingesting logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogsIngestionEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpointLogsIngestion(LogsIngestionEndpointSpec): + """The endpoint used by clients to ingest logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointLogsIngestion, self).__init__(**kwargs) + + +class NetworkRuleSet(msrest.serialization.Model): + """Definition of the network rules. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.amcs.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "KnownPublicNetworkAccessOptions"]] = None, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.public_network_access = public_network_access + + +class DataCollectionEndpointNetworkAcls(NetworkRuleSet): + """Network access control rules for the endpoints. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.amcs.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "KnownPublicNetworkAccessOptions"]] = None, + **kwargs + ): + super(DataCollectionEndpointNetworkAcls, self).__init__(public_network_access=public_network_access, **kwargs) + + +class DataCollectionEndpointResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or ~azure.mgmt.amcs.models.KnownDataCollectionEndpointResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'properties.configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'properties.logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, *, - name: str, + location: str, + tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "KnownDataCollectionEndpointResourceKind"]] = None, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["ConfigurationAccessEndpointSpec"] = None, + logs_ingestion: Optional["LogsIngestionEndpointSpec"] = None, + network_acls: Optional["NetworkRuleSet"] = None, **kwargs ): - super(AzureMonitorMetricsDestination, self).__init__(**kwargs) - self.name = name + super(DataCollectionEndpointResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.kind = kind + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = description + self.immutable_id = immutable_id + self.configuration_access = configuration_access + self.logs_ingestion = logs_ingestion + self.network_acls = network_acls + self.provisioning_state = None + + +class DataCollectionEndpointResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~azure.mgmt.amcs.models.DataCollectionEndpointResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionEndpointResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DataCollectionEndpointResource"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataCollectionEndpointResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: ~azure.mgmt.amcs.models.ConfigurationAccessEndpointSpec + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: ~azure.mgmt.amcs.models.LogsIngestionEndpointSpec + :param network_acls: Network access control rules for the endpoints. + :type network_acls: ~azure.mgmt.amcs.models.NetworkRuleSet + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'ConfigurationAccessEndpointSpec'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'LogsIngestionEndpointSpec'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["ConfigurationAccessEndpointSpec"] = None, + logs_ingestion: Optional["LogsIngestionEndpointSpec"] = None, + network_acls: Optional["NetworkRuleSet"] = None, + **kwargs + ): + super(DataCollectionEndpointResourceProperties, self).__init__(description=description, immutable_id=immutable_id, configuration_access=configuration_access, logs_ingestion=logs_ingestion, network_acls=network_acls, **kwargs) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class DataCollectionEndpointResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionEndpointResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) class DataCollectionRule(msrest.serialization.Model): @@ -48,33 +505,32 @@ class DataCollectionRule(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, @@ -84,14 +540,15 @@ class DataCollectionRule(msrest.serialization.Model): def __init__( self, *, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], description: Optional[str] = None, data_sources: Optional["DataSourcesSpec"] = None, + destinations: Optional["DestinationsSpec"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRule, self).__init__(**kwargs) self.description = description + self.immutable_id = None self.data_sources = data_sources self.destinations = destinations self.data_flows = data_flows @@ -103,41 +560,43 @@ class DataCollectionRuleAssociation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, **kwargs ): super(DataCollectionRuleAssociation, self).__init__(**kwargs) self.description = description self.data_collection_rule_id = data_collection_rule_id + self.data_collection_endpoint_id = data_collection_endpoint_id self.provisioning_state = None @@ -146,8 +605,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -156,15 +613,20 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) :vartype type: str :ivar etag: Resource entity tag (ETag). :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -172,8 +634,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -182,16 +643,19 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'properties.dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'properties.dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, **kwargs ): super(DataCollectionRuleAssociationProxyOnlyResource, self).__init__(**kwargs) @@ -199,8 +663,10 @@ def __init__( self.name = None self.type = None self.etag = None + self.system_data = None self.description = description self.data_collection_rule_id = data_collection_rule_id + self.data_collection_endpoint_id = data_collection_endpoint_id self.provisioning_state = None @@ -210,8 +676,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serializat All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + :type value: list[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -242,55 +707,95 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, **kwargs ): - super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(description=description, data_collection_rule_id=data_collection_rule_id, **kwargs) + super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(description=description, data_collection_rule_id=data_collection_rule_id, data_collection_endpoint_id=data_collection_endpoint_id, **kwargs) + + +class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) class DataSourcesSpec(msrest.serialization.Model): """Specification of data sources that will be collected. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: list[~azure.mgmt.amcs.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: list[~azure.mgmt.amcs.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. - :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :type syslog: list[~azure.mgmt.amcs.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: list[~azure.mgmt.amcs.models.ExtensionDataSource] """ _attribute_map = { @@ -321,16 +826,13 @@ class DataCollectionRuleDataSources(DataSourcesSpec): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: list[~azure.mgmt.amcs.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: list[~azure.mgmt.amcs.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. - :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :type syslog: list[~azure.mgmt.amcs.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: list[~azure.mgmt.amcs.models.ExtensionDataSource] """ _attribute_map = { @@ -356,11 +858,9 @@ class DestinationsSpec(msrest.serialization.Model): """Specification of destinations that can be used in data flows. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: list[~azure.mgmt.amcs.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: ~azure.mgmt.amcs.models.AzureMonitorMetricsDestination """ _attribute_map = { @@ -384,11 +884,9 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: list[~azure.mgmt.amcs.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: ~azure.mgmt.amcs.models.AzureMonitorMetricsDestination """ _attribute_map = { @@ -417,6 +915,8 @@ class DataCollectionRuleResource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or ~azure.mgmt.amcs.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -425,20 +925,24 @@ class DataCollectionRuleResource(msrest.serialization.Model): :vartype type: str :ivar etag: Resource entity tag (ETag). :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.amcs.models.SystemData :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -447,20 +951,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'system_data': {'readonly': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, 'data_sources': {'key': 'properties.dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'properties.destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, @@ -471,21 +977,25 @@ def __init__( self, *, location: str, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "KnownDataCollectionRuleResourceKind"]] = None, description: Optional[str] = None, data_sources: Optional["DataSourcesSpec"] = None, + destinations: Optional["DestinationsSpec"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRuleResource, self).__init__(**kwargs) self.location = location self.tags = tags + self.kind = kind self.id = None self.name = None self.type = None self.etag = None + self.system_data = None self.description = description + self.immutable_id = None self.data_sources = data_sources self.destinations = destinations self.data_flows = data_flows @@ -498,8 +1008,7 @@ class DataCollectionRuleResourceListResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + :type value: list[~azure.mgmt.amcs.models.DataCollectionRuleResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -530,33 +1039,32 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. - :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :type data_sources: ~azure.mgmt.amcs.models.DataSourcesSpec + :param destinations: The specification of destinations. + :type destinations: ~azure.mgmt.amcs.models.DestinationsSpec + :param data_flows: The specification of data flows. + :type data_flows: list[~azure.mgmt.amcs.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.amcs.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, @@ -566,32 +1074,66 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): def __init__( self, *, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], description: Optional[str] = None, data_sources: Optional["DataSourcesSpec"] = None, + destinations: Optional["DestinationsSpec"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRuleResourceProperties, self).__init__(description=description, data_sources=data_sources, destinations=destinations, data_flows=data_flows, **kwargs) +class DataCollectionRuleResourceSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.amcs.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionRuleResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) + + class DataFlow(msrest.serialization.Model): """Definition of which streams are sent to which destinations. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams for this data flow. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataFlowStreams] - :param destinations: Required. List of destinations for this data flow. + :param streams: List of streams for this data flow. + :type streams: list[str or ~azure.mgmt.amcs.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. :type destinations: list[str] """ - _validation = { - 'streams': {'required': True}, - 'destinations': {'required': True}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'destinations': {'key': 'destinations', 'type': '[str]'}, @@ -600,8 +1142,8 @@ class DataFlow(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownDataFlowStreams"]], - destinations: List[str], + streams: Optional[List[Union[str, "KnownDataFlowStreams"]]] = None, + destinations: Optional[List[str]] = None, **kwargs ): super(DataFlow, self).__init__(**kwargs) @@ -612,18 +1154,12 @@ def __init__( class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -631,14 +1167,14 @@ class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): def __init__( self, *, - name: str, + name: Optional[str] = None, **kwargs ): super(DestinationsSpecAzureMonitorMetrics, self).__init__(name=name, **kwargs) class ErrorAdditionalInfo(msrest.serialization.Model): - """Additional information for common error response. + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. @@ -667,23 +1203,21 @@ def __init__( self.info = None -class ErrorDetails(msrest.serialization.Model): - """Common error details. +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code which can be used to programmatically identify the class of error. + :ivar code: The error code. :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. + :ivar message: The error message. :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). + :ivar target: The error target. :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] + :ivar details: The error details. + :vartype details: list[~azure.mgmt.amcs.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.amcs.models.ErrorAdditionalInfo] """ _validation = { @@ -698,7 +1232,7 @@ class ErrorDetails(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -706,55 +1240,7 @@ def __init__( self, **kwargs ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorDetailsautogenerated(msrest.serialization.Model): - """Common error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsautogenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetailsautogenerated, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -763,138 +1249,24 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails + :param error: The error object. + :type error: ~azure.mgmt.amcs.models.ErrorDetail """ - _validation = { - 'error': {'readonly': True}, - } - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, + *, + error: Optional["ErrorDetail"] = None, **kwargs ): super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseautogenerated(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetailsautogenerated'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseautogenerated, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetails): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) - - -class ErrorResponseErrorautogenerated(ErrorDetailsautogenerated): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsautogenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsautogenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseErrorautogenerated, self).__init__(**kwargs) + self.error = error class ExtensionDataSource(msrest.serialization.Model): @@ -903,83 +1275,88 @@ class ExtensionDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + :type streams: list[str or ~azure.mgmt.amcs.models.KnownExtensionDataSourceStreams] :param extension_name: Required. The name of the VM extension. :type extension_name: str :param extension_settings: The extension settings. The format is specific for particular extension. :type extension_settings: object - :param name: Required. A friendly name for the data source. + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'streams': {'required': True}, - 'extension_name': {'required': True, 'max_length': 64, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'extension_name': {'required': True}, } _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'extension_name': {'key': 'extensionName', 'type': 'str'}, 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, *, - streams: List[Union[str, "KnownExtensionDataSourceStreams"]], extension_name: str, - name: str, + streams: Optional[List[Union[str, "KnownExtensionDataSourceStreams"]]] = None, extension_settings: Optional[object] = None, + input_data_sources: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(ExtensionDataSource, self).__init__(**kwargs) self.streams = streams self.extension_name = extension_name self.extension_settings = extension_settings + self.input_data_sources = input_data_sources self.name = name class LogAnalyticsDestination(msrest.serialization.Model): """Log Analytics destination. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param workspace_resource_id: Required. The resource ID of the Log Analytics workspace. + :param workspace_resource_id: The resource ID of the Log Analytics workspace. :type workspace_resource_id: str - :param name: Required. A friendly name for the destination. + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'workspace_resource_id': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'workspace_id': {'readonly': True}, } _attribute_map = { 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, *, - workspace_resource_id: str, - name: str, + workspace_resource_id: Optional[str] = None, + name: Optional[str] = None, **kwargs ): super(LogAnalyticsDestination, self).__init__(**kwargs) self.workspace_resource_id = workspace_resource_id + self.workspace_id = None self.name = name @@ -987,43 +1364,26 @@ class PerfCounterDataSource(msrest.serialization.Model): """Definition of which performance counters will be collected and how they will be collected by this data collection rule. Collected from both Windows and Linux machines where the counter is present. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceScheduledTransferPeriod - :param sampling_frequency_in_seconds: Required. The number of seconds between consecutive - counter measurements (samples). + :type streams: list[str or ~azure.mgmt.amcs.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). :type sampling_frequency_in_seconds: int - :param counter_specifiers: Required. A list of specifier names of the performance counters you - want to collect. + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'. :type counter_specifiers: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'sampling_frequency_in_seconds': {'required': True, 'maximum': 30, 'minimum': 1}, - 'counter_specifiers': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, @@ -1032,16 +1392,14 @@ class PerfCounterDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownPerfCounterDataSourceStreams"]], - scheduled_transfer_period: Union[str, "KnownPerfCounterDataSourceScheduledTransferPeriod"], - sampling_frequency_in_seconds: int, - counter_specifiers: List[str], - name: str, + streams: Optional[List[Union[str, "KnownPerfCounterDataSourceStreams"]]] = None, + sampling_frequency_in_seconds: Optional[int] = None, + counter_specifiers: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(PerfCounterDataSource, self).__init__(**kwargs) self.streams = streams - self.scheduled_transfer_period = scheduled_transfer_period self.sampling_frequency_in_seconds = sampling_frequency_in_seconds self.counter_specifiers = counter_specifiers self.name = name @@ -1072,31 +1430,20 @@ class SyslogDataSource(msrest.serialization.Model): """Definition of which syslog data will be collected and how it will be collected. Only collected from Linux machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] - :param facility_names: Required. The list of facility names. - :type facility_names: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + :type streams: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceFacilityNames] :param log_levels: The log levels to collect. - :type log_levels: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] - :param name: Required. A friendly name for the data source. + :type log_levels: list[str or ~azure.mgmt.amcs.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'facility_names': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, @@ -1107,10 +1454,10 @@ class SyslogDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownSyslogDataSourceStreams"]], - facility_names: List[Union[str, "KnownSyslogDataSourceFacilityNames"]], - name: str, + streams: Optional[List[Union[str, "KnownSyslogDataSourceStreams"]]] = None, + facility_names: Optional[List[Union[str, "KnownSyslogDataSourceFacilityNames"]]] = None, log_levels: Optional[List[Union[str, "KnownSyslogDataSourceLogLevels"]]] = None, + name: Optional[str] = None, **kwargs ): super(SyslogDataSource, self).__init__(**kwargs) @@ -1124,36 +1471,20 @@ class WindowsEventLogDataSource(msrest.serialization.Model): """Definition of which Windows Event Log events will be collected and how they will be collected. Only collected from Windows machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceScheduledTransferPeriod - :param x_path_queries: Required. A list of Windows Event Log queries in XPATH format. + :type streams: list[str or ~azure.mgmt.amcs.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. :type x_path_queries: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'x_path_queries': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -1161,14 +1492,12 @@ class WindowsEventLogDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownWindowsEventLogDataSourceStreams"]], - scheduled_transfer_period: Union[str, "KnownWindowsEventLogDataSourceScheduledTransferPeriod"], - x_path_queries: List[str], - name: str, + streams: Optional[List[Union[str, "KnownWindowsEventLogDataSourceStreams"]]] = None, + x_path_queries: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(WindowsEventLogDataSource, self).__init__(**kwargs) self.streams = streams - self.scheduled_transfer_period = scheduled_transfer_period self.x_path_queries = x_path_queries self.name = name diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_monitor_client_enums.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_monitor_client_enums.py index 2308243d3ed..9617f5f9e1e 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_monitor_client_enums.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_monitor_client_enums.py @@ -26,6 +26,32 @@ def __getattr__(cls, name): raise AttributeError(name) +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class KnownDataCollectionEndpointProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The resource provisioning state. This property is READ-ONLY. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class KnownDataCollectionEndpointResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of the resource. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + class KnownDataCollectionRuleAssociationProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The resource provisioning state. """ @@ -46,67 +72,42 @@ class KnownDataCollectionRuleProvisioningState(with_metaclass(_CaseInsensitiveEn SUCCEEDED = "Succeeded" FAILED = "Failed" +class KnownDataCollectionRuleResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of the resource. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + class KnownDataFlowStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - MICROSOFT_ANTI_MALWARE_STATUS = "Microsoft-AntiMalwareStatus" - MICROSOFT_AUDITD = "Microsoft-Auditd" - MICROSOFT_CISCOASA = "Microsoft-CISCOASA" - MICROSOFT_COMMON_SECURITY_LOG = "Microsoft-CommonSecurityLog" - MICROSOFT_COMPUTER_GROUP = "Microsoft-ComputerGroup" MICROSOFT_EVENT = "Microsoft-Event" - MICROSOFT_FIREWALL_LOG = "Microsoft-FirewallLog" - MICROSOFT_HEALTH_STATE_CHANGE = "Microsoft-HealthStateChange" - MICROSOFT_HEARTBEAT = "Microsoft-Heartbeat" MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" - MICROSOFT_OPERATION_LOG = "Microsoft-OperationLog" MICROSOFT_PERF = "Microsoft-Perf" - MICROSOFT_PROCESS_INVESTIGATOR = "Microsoft-ProcessInvestigator" - MICROSOFT_PROTECTION_STATUS = "Microsoft-ProtectionStatus" - MICROSOFT_ROME_DETECTION_EVENT = "Microsoft-RomeDetectionEvent" - MICROSOFT_SECURITY_BASELINE = "Microsoft-SecurityBaseline" - MICROSOFT_SECURITY_BASELINE_SUMMARY = "Microsoft-SecurityBaselineSummary" - MICROSOFT_SECURITY_EVENT = "Microsoft-SecurityEvent" MICROSOFT_SYSLOG = "Microsoft-Syslog" MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" class KnownExtensionDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - MICROSOFT_ANTI_MALWARE_STATUS = "Microsoft-AntiMalwareStatus" - MICROSOFT_AUDITD = "Microsoft-Auditd" - MICROSOFT_CISCOASA = "Microsoft-CISCOASA" - MICROSOFT_COMMON_SECURITY_LOG = "Microsoft-CommonSecurityLog" - MICROSOFT_COMPUTER_GROUP = "Microsoft-ComputerGroup" MICROSOFT_EVENT = "Microsoft-Event" - MICROSOFT_FIREWALL_LOG = "Microsoft-FirewallLog" - MICROSOFT_HEALTH_STATE_CHANGE = "Microsoft-HealthStateChange" - MICROSOFT_HEARTBEAT = "Microsoft-Heartbeat" MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" - MICROSOFT_OPERATION_LOG = "Microsoft-OperationLog" MICROSOFT_PERF = "Microsoft-Perf" - MICROSOFT_PROCESS_INVESTIGATOR = "Microsoft-ProcessInvestigator" - MICROSOFT_PROTECTION_STATUS = "Microsoft-ProtectionStatus" - MICROSOFT_ROME_DETECTION_EVENT = "Microsoft-RomeDetectionEvent" - MICROSOFT_SECURITY_BASELINE = "Microsoft-SecurityBaseline" - MICROSOFT_SECURITY_BASELINE_SUMMARY = "Microsoft-SecurityBaselineSummary" - MICROSOFT_SECURITY_EVENT = "Microsoft-SecurityEvent" MICROSOFT_SYSLOG = "Microsoft-Syslog" MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" -class KnownPerfCounterDataSourceScheduledTransferPeriod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The interval between data uploads (scheduled transfers), rounded up to the nearest minute. - """ - - PT1_M = "PT1M" - PT5_M = "PT5M" - PT15_M = "PT15M" - PT30_M = "PT30M" - PT60_M = "PT60M" - class KnownPerfCounterDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_PERF = "Microsoft-Perf" MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" +class KnownPublicNetworkAccessOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The configuration to set whether network access from public internet to the endpoints are + allowed. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AUTH = "auth" @@ -120,7 +121,7 @@ class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta NEWS = "news" SYSLOG = "syslog" USER = "user" - UUCP = "UUCP" + UUCP = "uucp" LOCAL0 = "local0" LOCAL1 = "local1" LOCAL2 = "local2" @@ -129,6 +130,7 @@ class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta LOCAL5 = "local5" LOCAL6 = "local6" LOCAL7 = "local7" + ASTERISK = "*" class KnownSyslogDataSourceLogLevels(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -140,21 +142,12 @@ class KnownSyslogDataSourceLogLevels(with_metaclass(_CaseInsensitiveEnumMeta, st CRITICAL = "Critical" ALERT = "Alert" EMERGENCY = "Emergency" + ASTERISK = "*" class KnownSyslogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_SYSLOG = "Microsoft-Syslog" -class KnownWindowsEventLogDataSourceScheduledTransferPeriod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The interval between data uploads (scheduled transfers), rounded up to the nearest minute. - """ - - PT1_M = "PT1M" - PT5_M = "PT5M" - PT15_M = "PT15M" - PT30_M = "PT30M" - PT60_M = "PT60M" - class KnownWindowsEventLogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/__init__.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/__init__.py index f755a04ab06..86676ba9262 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/__init__.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/__init__.py @@ -6,10 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._data_collection_endpoints_operations import DataCollectionEndpointsOperations from ._data_collection_rule_associations_operations import DataCollectionRuleAssociationsOperations from ._data_collection_rules_operations import DataCollectionRulesOperations __all__ = [ + 'DataCollectionEndpointsOperations', 'DataCollectionRuleAssociationsOperations', 'DataCollectionRulesOperations', ] diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_endpoints_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_endpoints_operations.py new file mode 100644 index 00000000000..87541fc7721 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_endpoints_operations.py @@ -0,0 +1,465 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionEndpointsOperations(object): + """DataCollectionEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.amcs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DataCollectionEndpointResourceListResult"] + """Lists all data collection endpoints in the specified resource group. + + Lists all data collection endpoints in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DataCollectionEndpointResourceListResult"] + """Lists all data collection endpoints in the specified subscription. + + Lists all data collection endpoints in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def get( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DataCollectionEndpointResource" + """Returns the specified data collection endpoint. + + Returns the specified data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def create( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + body=None, # type: Optional["models.DataCollectionEndpointResource"] + **kwargs # type: Any + ): + # type: (...) -> "models.DataCollectionEndpointResource" + """Creates or updates a data collection endpoint. + + Creates or updates a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionEndpointResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + body=None, # type: Optional["models.ResourceForUpdate"] + **kwargs # type: Any + ): + # type: (...) -> "models.DataCollectionEndpointResource" + """Updates part of a data collection endpoint. + + Updates part of a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~azure.mgmt.amcs.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~azure.mgmt.amcs.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a data collection endpoint. + + Deletes a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rule_associations_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rule_associations_operations.py index 6cd2e8d628a..00530df666a 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rule_associations_operations.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rule_associations_operations.py @@ -30,7 +30,7 @@ class DataCollectionRuleAssociationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2019_11_01_preview.models + :type models: ~azure.mgmt.amcs.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,7 @@ def list_by_resource( :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] @@ -67,7 +67,7 @@ def list_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,7 @@ def list_by_rule( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] @@ -144,7 +144,7 @@ def list_by_rule( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -158,7 +158,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -210,11 +210,11 @@ def get( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResource"] @@ -222,14 +222,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -272,13 +272,13 @@ def create( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :param body: The payload. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + :type body: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleAssociationProxyOnlyResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleAssociationProxyOnlyResource"] @@ -286,7 +286,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -294,7 +294,7 @@ def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -347,7 +347,7 @@ def delete( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -359,14 +359,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rules_operations.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rules_operations.py index 93c1bb0c35c..bc468bda805 100644 --- a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rules_operations.py +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/operations/_data_collection_rules_operations.py @@ -30,7 +30,7 @@ class DataCollectionRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2019_11_01_preview.models + :type models: ~azure.mgmt.amcs.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResourceListResult"] @@ -67,7 +67,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -108,7 +108,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -130,7 +130,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.amcs.models.DataCollectionRuleResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResourceListResult"] @@ -138,7 +138,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -207,7 +207,7 @@ def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] @@ -215,7 +215,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -223,7 +223,7 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -241,7 +241,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -270,10 +270,10 @@ def create( insensitive. :type data_collection_rule_name: str :param body: The payload. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :type body: ~azure.mgmt.amcs.models.DataCollectionRuleResource :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] @@ -281,7 +281,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -290,7 +290,7 @@ def create( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -315,7 +315,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -348,10 +348,10 @@ def update( insensitive. :type data_collection_rule_name: str :param body: The payload. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.amcs.models.ResourceForUpdate :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.amcs.models.DataCollectionRuleResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DataCollectionRuleResource"] @@ -359,7 +359,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -368,7 +368,7 @@ def update( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -393,7 +393,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -430,7 +430,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -438,7 +438,7 @@ def delete( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -456,7 +456,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponseautogenerated, response) + error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/setup.py b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/setup.py new file mode 100644 index 00000000000..b7ff449ff10 --- /dev/null +++ b/src/monitor-control-service/azext_amcs/vendored_sdks/amcs/setup.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# coding: utf-8 + +from setuptools import setup, find_packages + +NAME = "azure-mgmt-monitor" +VERSION = "0.1.0" + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["msrest>=0.6.18", "azure-core<2.0.0,>=1.8.2", "azure-mgmt-core<2.0.0,>=1.2.1"] + +setup( + name=NAME, + version=VERSION, + description="azure-mgmt-monitor", + author_email="", + url="", + keywords=["Swagger", "MonitorClient"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + Monitor Management Client. + """ +) diff --git a/src/monitor-control-service/report.md b/src/monitor-control-service/report.md index 3519ab35d93..af54dda63d9 100644 --- a/src/monitor-control-service/report.md +++ b/src/monitor-control-service/report.md @@ -9,10 +9,19 @@ ### Command groups in `az monitor-control-service` extension |CLI Command Group|Group Swagger name|Commands| |---------|------------|--------| -|az monitor data-collection rule association|DataCollectionRuleAssociations|[commands](#CommandsInDataCollectionRuleAssociations)| +|az monitor data-collection endpoint|DataCollectionEndpoints|[commands](#CommandsInDataCollectionEndpoints)| |az monitor data-collection rule|DataCollectionRules|[commands](#CommandsInDataCollectionRules)| +|az monitor data-collection rule association|DataCollectionRuleAssociations|[commands](#CommandsInDataCollectionRuleAssociations)| ## COMMANDS +### Commands in `az monitor data-collection endpoint` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az monitor data-collection endpoint list](#DataCollectionEndpointsListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersDataCollectionEndpointsListByResourceGroup)|[Example](#ExamplesDataCollectionEndpointsListByResourceGroup)| +|[az monitor data-collection endpoint list](#DataCollectionEndpointsListBySubscription)|ListBySubscription|[Parameters](#ParametersDataCollectionEndpointsListBySubscription)|[Example](#ExamplesDataCollectionEndpointsListBySubscription)| +|[az monitor data-collection endpoint show](#DataCollectionEndpointsGet)|Get|[Parameters](#ParametersDataCollectionEndpointsGet)|[Example](#ExamplesDataCollectionEndpointsGet)| +|[az monitor data-collection endpoint delete](#DataCollectionEndpointsDelete)|Delete|[Parameters](#ParametersDataCollectionEndpointsDelete)|[Example](#ExamplesDataCollectionEndpointsDelete)| + ### Commands in `az monitor data-collection rule` group |CLI Command|Operation Swagger name|Parameters|Examples| |---------|------------|--------|-----------| @@ -31,6 +40,51 @@ ## COMMAND DETAILS +### group `az monitor data-collection endpoint` +#### Command `az monitor data-collection endpoint list` + +##### Example +``` +az monitor data-collection endpoint list --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| + +#### Command `az monitor data-collection endpoint list` + +##### Example +``` +az monitor data-collection endpoint list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| + +#### Command `az monitor data-collection endpoint show` + +##### Example +``` +az monitor data-collection endpoint show --name "myCollectionEndpoint" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--data-collection-endpoint-name**|string|The name of the data collection endpoint. The name is case insensitive.|data_collection_endpoint_name|dataCollectionEndpointName| + +#### Command `az monitor data-collection endpoint delete` + +##### Example +``` +az monitor data-collection endpoint delete --name "myCollectionEndpoint" --resource-group "myResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--data-collection-endpoint-name**|string|The name of the data collection endpoint. The name is case insensitive.|data_collection_endpoint_name|dataCollectionEndpointName| ### group `az monitor data-collection rule` #### Command `az monitor data-collection rule list` @@ -53,6 +107,7 @@ az monitor data-collection rule list ##### Parameters |Option|Type|Description|Path (SDK)|Swagger name| |------|----|-----------|----------|------------| + #### Command `az monitor data-collection rule show` ##### Example @@ -113,7 +168,7 @@ az monitor data-collection rule association show --name "myAssociation" --resour |Option|Type|Description|Path (SDK)|Swagger name| |------|----|-----------|----------|------------| |**--resource-uri**|string|The identifier of the resource.|resource_uri|resourceUri| -|**--association-name**|string|The name of the association.|association_name|associationName| +|**--association-name**|string|The name of the association. The name is case insensitive.|association_name|associationName| #### Command `az monitor data-collection rule association delete` @@ -126,4 +181,4 @@ az monitor data-collection rule association delete --name "myAssociation" --reso |Option|Type|Description|Path (SDK)|Swagger name| |------|----|-----------|----------|------------| |**--resource-uri**|string|The identifier of the resource.|resource_uri|resourceUri| -|**--association-name**|string|The name of the association.|association_name|associationName| +|**--association-name**|string|The name of the association. The name is case insensitive.|association_name|associationName| From a5e1c42d479271b7af95de76f1b7741bad51bad4 Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Wed, 9 Jun 2021 20:48:59 -0600 Subject: [PATCH 18/37] [vmware] update to AVS 2021-06-01 API (#3432) * update to AVS 2021-06-01 API * update to AVS 2021-06-01 API * tests passing for VmwareScenarioTest * started datastore changes * updated datastore * Added test recordings for datastores Co-authored-by: Raaghavi Sivaguru * ci issues * hcx tests coming soon * put back help * add addons * custom_show_command * fix flake8 * hcx tests * rename to netapp-volume * add addon to changelog * format as [BREAKING CHANGE] in CHANGELOG.md Co-authored-by: Xing Zhou * capitalize other changes * add deprecate_info to datastore_create Co-authored-by: Raaghavi Co-authored-by: Raaghavi Sivaguru Co-authored-by: Xing Zhou --- src/vmware/CHANGELOG.md | 16 +- src/vmware/DEVELOPMENT.md | 2 +- src/vmware/azext_vmware/_help.py | 155 +- src/vmware/azext_vmware/_params.py | 22 +- src/vmware/azext_vmware/commands.py | 29 +- src/vmware/azext_vmware/custom.py | 101 +- .../tests/latest/recordings/test_vmware.yaml | 2248 ++++++----------- .../latest/recordings/test_vmware_addon.yaml | 1805 +++++++++++++ .../recordings/test_vmware_datastores.yaml | 426 +++- .../latest/recordings/test_vmware_hcx.yaml | 1812 +++++++++++++ .../tests/latest/test_addon_scenario.py | 65 + .../tests/latest/test_datastores_scenario.py | 32 +- .../tests/latest/test_hcx_scenario.py | 52 + .../tests/latest/test_vmware_scenario.py | 24 +- .../vendored_sdks/avs_client/__init__.py | 7 +- .../vendored_sdks/avs_client/_avs_client.py | 43 +- .../avs_client/_configuration.py | 11 +- .../vendored_sdks/avs_client/_version.py | 9 + .../vendored_sdks/avs_client/aio/__init__.py | 4 +- .../avs_client/aio/_avs_client.py | 42 +- .../avs_client/aio/_configuration.py | 11 +- .../avs_client/aio/operations/__init__.py | 12 +- .../aio/operations/_addons_operations.py | 46 +- .../operations/_authorizations_operations.py | 41 +- .../aio/operations/_cloud_links_operations.py | 440 ++++ .../aio/operations/_clusters_operations.py | 75 +- .../aio/operations/_datastores_operations.py | 71 +- .../_global_reach_connections_operations.py | 53 +- .../_hcx_enterprise_sites_operations.py | 27 +- .../aio/operations/_locations_operations.py | 12 +- .../avs_client/aio/operations/_operations.py | 8 +- .../operations/_private_clouds_operations.py | 70 +- .../operations/_script_cmdlets_operations.py | 188 ++ .../_script_executions_operations.py | 512 ++++ .../operations/_script_packages_operations.py | 178 ++ .../_workload_networks_operations.py | 682 ++++- .../avs_client/models/__init__.py | 76 +- .../avs_client/models/_avs_client_enums.py | 91 +- .../avs_client/models/_models.py | 1034 ++++++-- .../avs_client/models/_models_py3.py | 1092 ++++++-- .../avs_client/operations/__init__.py | 12 +- .../operations/_addons_operations.py | 34 +- .../operations/_authorizations_operations.py | 29 +- .../operations/_cloud_links_operations.py | 450 ++++ .../operations/_clusters_operations.py | 59 +- .../operations/_datastores_operations.py | 59 +- .../_global_reach_connections_operations.py | 41 +- .../_hcx_enterprise_sites_operations.py | 19 +- .../operations/_locations_operations.py | 8 +- .../avs_client/operations/_operations.py | 6 +- .../operations/_private_clouds_operations.py | 42 +- .../operations/_script_cmdlets_operations.py | 194 ++ .../_script_executions_operations.py | 523 ++++ .../operations/_script_packages_operations.py | 184 ++ .../_workload_networks_operations.py | 584 ++++- .../azext_vmware/vendored_sdks/setup.py | 37 + 56 files changed, 11366 insertions(+), 2539 deletions(-) create mode 100644 src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml create mode 100644 src/vmware/azext_vmware/tests/latest/recordings/test_vmware_hcx.yaml create mode 100644 src/vmware/azext_vmware/tests/latest/test_addon_scenario.py create mode 100644 src/vmware/azext_vmware/tests/latest/test_hcx_scenario.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py create mode 100644 src/vmware/azext_vmware/vendored_sdks/setup.py diff --git a/src/vmware/CHANGELOG.md b/src/vmware/CHANGELOG.md index 05f07479a8d..afacacd5707 100644 --- a/src/vmware/CHANGELOG.md +++ b/src/vmware/CHANGELOG.md @@ -1,8 +1,16 @@ # Release History -## 2.1.0 (TBD) -- add az vmware private-cloud rotate-vcenter-password -- add az vmware private-cloud rotate-nsxt-password +## 3.0.0 (2021-06) +- [BREAKING CHANGE] `az vmware datastore create` has been removed. Please use `az vmware datastore netapp-volume create` or `az vmware datastore disk-pool-volume create` instead. + +Other changes: +- Update to AVS 2021-06-01 API +- Add `az vmware private-cloud rotate-vcenter-password` +- Add `az vmware private-cloud rotate-nsxt-password` +- Add `az vmware addon` command group +- Add `az vmware addon hcx` command group to manage a HCX addon +- Add `az vmware addon srm` command group to manage a Site Recovery Manager (SRM) addon +- Add `az vmware addon vr` command group to manage a vSphere Replication (VR) addon ## 2.0.1 (2021-02) - Update the minimum az cli version to 2.11.0 [#3045](https://github.com/Azure/azure-cli-extensions/issues/3045) @@ -74,4 +82,4 @@ Add command for managing HCX Enterprise Sites for a private cloud: ## 0.2.0 (2019-07-16) - initial preview release -- see archived [az-vmware-cli releases](https://github.com/Azure/az-vmware-cli/releases) \ No newline at end of file +- see archived [az-vmware-cli releases](https://github.com/Azure/az-vmware-cli/releases) diff --git a/src/vmware/DEVELOPMENT.md b/src/vmware/DEVELOPMENT.md index 6340c88c2c2..2866426b5ba 100644 --- a/src/vmware/DEVELOPMENT.md +++ b/src/vmware/DEVELOPMENT.md @@ -3,6 +3,6 @@ ``` powershell rm ..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks -Recurse -autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks --use=@autorest/python@5.6.1 --tag=package-2021-01-01-preview --azure-arm=true --override-client-name=AVSClient specification\vmware\resource-manager\readme.md +autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks --use=@autorest/python@5.8.0 --tag=package-2021-06-01 --azure-arm=true --namespace=avs_client --override-client-name=AVSClient specification\vmware\resource-manager\readme.md ``` It was run from a git clone of [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs). diff --git a/src/vmware/azext_vmware/_help.py b/src/vmware/azext_vmware/_help.py index f72f8d12e33..ecda202e798 100644 --- a/src/vmware/azext_vmware/_help.py +++ b/src/vmware/azext_vmware/_help.py @@ -12,6 +12,26 @@ short-summary: Commands to manage Azure VMware Solution. """ +helps['vmware addon'] = """ + type: group + short-summary: Commands to manage addons for a private cloud. +""" + +helps['vmware addon hcx'] = """ + type: group + short-summary: Commands to manage a HCX addon. +""" + +helps['vmware addon srm'] = """ + type: group + short-summary: Commands to manage a Site Recovery Manager (SRM) addon. +""" + +helps['vmware addon vr'] = """ + type: group + short-summary: Commands to manage a vSphere Replication (VR) addon. +""" + helps['vmware private-cloud'] = """ type: group short-summary: Commands to manage private clouds. @@ -175,14 +195,33 @@ helps['vmware datastore create'] = """ type: command - short-summary: Create a datastore in a private cloud cluster. + short-summary: Please use "netapp-volume create" or "disk-pool-volume create" instead. +""" + +helps['vmware datastore netapp-volume'] = """ + type: group + short-summary: Create a new Microsoft.NetApp provided NetApp volume in a private cloud cluster. +""" + +helps['vmware datastore netapp-volume create'] = """ + type: command + short-summary: Create a new Microsoft.NetApp provided NetApp volume in a private cloud cluster. examples: - - name: Create a new Microsoft.StoragePool provided disk pool based iSCSI datastore. - text: az vmware datastore create --name iSCSIDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud --endpoints 10.10.0.1:3260 --lun-name lun0 - - name: Create a new Microsoft.StoragePool provided disk pool based iSCSI datastore with multiple endpoints. - text: az vmware datastore create --name iSCSIDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud --endpoints 10.10.0.1:3260 10.10.0.2:3260 --lun-name lun0 - name: Create a new Microsoft.NetApp provided NetApp volume based NFSv3 datastore. - text: az vmware datastore create --name ANFDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud --nfs-file-path ANFVol1FilePath --nfs-provider-ip 10.10.0.1 + text: az vmware datastore netapp-volume create --name ANFDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud --volume-id /subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1 +""" + +helps['vmware datastore disk-pool-volume'] = """ + type: group + short-summary: Create a VMFS datastore in a private cloud cluster using Microsoft.StoragePool provided iSCSI target. +""" + +helps['vmware datastore disk-pool-volume create'] = """ + type: command + short-summary: Create a VMFS datastore in a private cloud cluster using Microsoft.StoragePool provided iSCSI target. + examples: + - name: Create a new Microsoft.StoragePool provided disk pool based iSCSI datastore. + text: az vmware datastore disk-pool-volume create --name iSCSIDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud --target-id /subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.StoragePool/diskPools/mpio-diskpool/iscsiTargets/mpio-iscsi-target --lun-name lun0 """ helps['vmware datastore show'] = """ @@ -208,3 +247,107 @@ - name: Delete an iSCSI or NFS based datastore. text: az vmware datastore delete --name MyCloudSANDatastore1 --resource-group MyResourceGroup --cluster Cluster-1 --private-cloud MyPrivateCloud """ + +helps['vmware addon list'] = """ + type: command + short-summary: List addons in a private cloud. + examples: + - name: List addons in a private cloud. + text: az vmware addon list --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon vr create'] = """ + type: command + short-summary: Create a vSphere Replication (VR) addon for a private cloud. + examples: + - name: Create a vSphere Replication (VR) addon. + text: az vmware addon vr create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vrs-count 1 +""" + +helps['vmware addon hcx create'] = """ + type: command + short-summary: Create a HCX addon for a private cloud. + examples: + - name: Create a HCX addon. + text: az vmware addon hcx create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --offer "VMware MaaS Cloud Provider (Enterprise)" +""" + +helps['vmware addon srm create'] = """ + type: command + short-summary: Create a Site Recovery Manager (SRM) addon for a private cloud. + examples: + - name: Create a Site Recovery Manager (SRM) addon. + text: az vmware addon srm create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5" +""" + +helps['vmware addon vr show'] = """ + type: command + short-summary: Show details of a vSphere Replication (VR) addon for a private cloud. + examples: + - name: Show details of a vSphere Replication (VR) addon. + text: az vmware addon vr show --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon hcx show'] = """ + type: command + short-summary: Show details of a HCX addon for a private cloud. + examples: + - name: Show details of a HCX addon. + text: az vmware addon hcx show --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon srm show'] = """ + type: command + short-summary: Show details of a Site Recovery Manager (SRM) addon for a private cloud. + examples: + - name: Show details of a Site Recovery Manager (SRM) addon. + text: az vmware addon srm show --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon vr update'] = """ + type: command + short-summary: Update a vSphere Replication (VR) addon for a private cloud. + examples: + - name: Update a vSphere Replication (VR) addon. + text: az vmware addon vr update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vrs-count 1 +""" + +helps['vmware addon hcx update'] = """ + type: command + short-summary: Update a HCX addon for a private cloud. + examples: + - name: Update a HCX addon. + text: az vmware addon hcx update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --offer "VMware MaaS Cloud Provider (Enterprise)" +""" + +helps['vmware addon srm update'] = """ + type: command + short-summary: Update a Site Recovery Manager (SRM) addon for a private cloud. + examples: + - name: Update a Site Recovery Manager (SRM) addon. + text: az vmware addon srm update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5" +""" + +helps['vmware addon vr delete'] = """ + type: command + short-summary: Delete a vSphere Replication (VR) addon for a private cloud. + examples: + - name: Delete a vSphere Replication (VR) addon. + text: az vmware addon vr delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon hcx delete'] = """ + type: command + short-summary: Delete a HCX addon for a private cloud. + examples: + - name: Delete a HCX addon. + text: az vmware addon hcx delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" + +helps['vmware addon srm delete'] = """ + type: command + short-summary: Delete a Site Recovery Manager (SRM) addon for a private cloud. + examples: + - name: Delete a Site Recovery Manager (SRM) addon. + text: az vmware addon srm delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud +""" diff --git a/src/vmware/azext_vmware/_params.py b/src/vmware/azext_vmware/_params.py index 5b49ffb1b28..c0119f22bef 100644 --- a/src/vmware/azext_vmware/_params.py +++ b/src/vmware/azext_vmware/_params.py @@ -74,9 +74,29 @@ def load_arguments(self, _): with self.argument_context('vmware datastore') as c: c.argument('name', options_list=['--name', '-n'], help='The name of the datastore.') c.argument('cluster', help='The name of the cluster.') + c.argument('lun_name', help='Name of the LUN to be used.') with self.argument_context('vmware datastore create') as c: c.argument('nfs_provider_ip', help='IP address of the NFS provider.') c.argument('nfs_file_path', help='File path through which the NFS volume is exposed by the provider.') c.argument('endpoints', nargs='*', help='iSCSI provider target IP address list.') - c.argument('lun_name', help='Name of the LUN to be used.') + + with self.argument_context('vmware datastore netapp-volume create') as c: + c.argument('volume_id', help='Azure resource ID of the NetApp volume.') + + with self.argument_context('vmware datastore disk-pool-volume create') as c: + c.argument('target_id', help='Azure resource ID of the iSCSI target.') + c.argument('mount_option', nargs='*', help='Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN.') + c.argument('path', help='Device path.') + + with self.argument_context('vmware addon') as c: + c.argument('name', options_list=['--name', '-n'], help='Name of the addon.') + + with self.argument_context('vmware addon vr') as c: + c.argument('vrs_count', help='The vSphere Replication Server (VRS) count.') + + with self.argument_context('vmware addon hcx') as c: + c.argument('offer', help='The HCX offer, example "VMware MaaS Cloud Provider (Enterprise)".') + + with self.argument_context('vmware addon srm') as c: + c.argument('license_key', help='The Site Recovery Manager (SRM) license.') diff --git a/src/vmware/azext_vmware/commands.py b/src/vmware/azext_vmware/commands.py index c68fdea62e9..e47c3516b27 100644 --- a/src/vmware/azext_vmware/commands.py +++ b/src/vmware/azext_vmware/commands.py @@ -49,7 +49,34 @@ def load_command_table(self, _): g.custom_command('checktrialavailability', 'check_trial_availability') with self.command_group('vmware datastore', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'datastore_create') + g.custom_command('create', 'datastore_create', deprecate_info=g.deprecate(redirect='"az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create"', hide=True)) g.custom_command('list', 'datastore_list') g.custom_show_command('show', 'datastore_show') g.custom_command('delete', 'datastore_delete') + + with self.command_group('vmware datastore netapp-volume', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'datastore_netappvolume_create') + + with self.command_group('vmware datastore disk-pool-volume', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'datastore_diskpoolvolume_create') + + with self.command_group('vmware addon', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('list', 'addon_list') + + with self.command_group('vmware addon vr', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'addon_vr_create') + g.custom_show_command('show', 'addon_vr_show') + g.custom_command('update', 'addon_vr_update') + g.custom_command('delete', 'addon_vr_delete') + + with self.command_group('vmware addon hcx', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'addon_hcx_create') + g.custom_show_command('show', 'addon_hcx_show') + g.custom_command('update', 'addon_hcx_update') + g.custom_command('delete', 'addon_hcx_delete') + + with self.command_group('vmware addon srm', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'addon_srm_create') + g.custom_show_command('show', 'addon_srm_show') + g.custom_command('update', 'addon_srm_update') + g.custom_command('delete', 'addon_srm_delete') diff --git a/src/vmware/azext_vmware/custom.py b/src/vmware/azext_vmware/custom.py index e776ddda036..6b9e61100ea 100644 --- a/src/vmware/azext_vmware/custom.py +++ b/src/vmware/azext_vmware/custom.py @@ -109,15 +109,12 @@ def privatecloud_rotate_nsxt_password(cmd, client: AVSClient, resource_group_nam def cluster_create(cmd, client: AVSClient, resource_group_name, name, sku, private_cloud, size, tags=[]): - from azext_vmware.vendored_sdks.avs_client.models import Cluster, Sku - cluster = Cluster(sku=Sku(name=sku), cluster_size=size) - return client.clusters.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster=cluster) + from azext_vmware.vendored_sdks.avs_client.models import Sku + return client.clusters.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, sku=Sku(name=sku), cluster_size=size) def cluster_update(cmd, client: AVSClient, resource_group_name, name, private_cloud, size, tags=[]): - from azext_vmware.vendored_sdks.avs_client.models import ClusterUpdate - cluster_update = ClusterUpdate(cluster_size=size) - return client.clusters.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster_update=cluster_update) + return client.clusters.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster_size=size) def cluster_list(cmd, client: AVSClient, resource_group_name, private_cloud): @@ -141,9 +138,7 @@ def check_trial_availability(cmd, client: AVSClient, location): def authorization_create(cmd, client: AVSClient, resource_group_name, private_cloud, name): - from azext_vmware.vendored_sdks.avs_client.models import ExpressRouteAuthorization - authorization = ExpressRouteAuthorization() - return client.authorizations.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name, authorization=authorization) + return client.authorizations.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) def authorization_list(cmd, client: AVSClient, resource_group_name, private_cloud): @@ -159,9 +154,7 @@ def authorization_delete(cmd, client: AVSClient, resource_group_name, private_cl def hcxenterprisesite_create(cmd, client: AVSClient, resource_group_name, private_cloud, name): - from azext_vmware.vendored_sdks.avs_client.models import HcxEnterpriseSite - hcx_enterprise_site = HcxEnterpriseSite() - return client.hcx_enterprise_sites.create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name, hcx_enterprise_site=hcx_enterprise_site) + return client.hcx_enterprise_sites.create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) def hcxenterprisesite_list(cmd, client: AVSClient, resource_group_name, private_cloud): @@ -177,13 +170,19 @@ def hcxenterprisesite_delete(cmd, client: AVSClient, resource_group_name, privat def datastore_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, nfs_provider_ip=None, nfs_file_path=None, endpoints=[], lun_name=None): - from azext_vmware.vendored_sdks.avs_client.models import Datastore, NetAppVolume, DiskPoolVolume - datastore = Datastore() - if nfs_provider_ip is not None or nfs_file_path is not None: - datastore.net_app_volume = NetAppVolume(nfs_provider_ip=nfs_provider_ip, nfs_file_path=nfs_file_path) - if len(endpoints) > 0 or lun_name is not None: - datastore.disk_pool_volume = DiskPoolVolume(endpoints=endpoints, lun_name=lun_name) - return client.datastores.begin_create(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, datastore=datastore) + print('Please use "az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create" instead.') + + +def datastore_netappvolume_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, volume_id): + from azext_vmware.vendored_sdks.avs_client.models import NetAppVolume + net_app_volume = NetAppVolume(id=volume_id) + return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, net_app_volume=net_app_volume, disk_pool_volume=None) + + +def datastore_diskpoolvolume_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, target_id, lun_name, mount_option="MOUNT", path=None): + from azext_vmware.vendored_sdks.avs_client.models import DiskPoolVolume + disk_pool_volume = DiskPoolVolume(target_id=target_id, lun_name=lun_name, mount_option=mount_option, path=path) + return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, net_app_volume=None, disk_pool_volume=disk_pool_volume) def datastore_list(cmd, client: AVSClient, resource_group_name, private_cloud, cluster): @@ -196,3 +195,67 @@ def datastore_show(cmd, client: AVSClient, resource_group_name, private_cloud, c def datastore_delete(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name): return client.datastores.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name) + + +def addon_list(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) + + +def addon_vr_create(cmd, client: AVSClient, resource_group_name, private_cloud, vrs_count: int): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonVrProperties + properties = AddonVrProperties(vrs_count=vrs_count) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", properties=properties) + + +def addon_hcx_create(cmd, client: AVSClient, resource_group_name, private_cloud, offer: str): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonHcxProperties + properties = AddonHcxProperties(offer=offer) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", properties=properties) + + +def addon_srm_create(cmd, client: AVSClient, resource_group_name, private_cloud, license_key: str): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonSrmProperties + properties = AddonSrmProperties(license_key=license_key) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", properties=properties) + + +def addon_vr_show(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") + + +def addon_hcx_show(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") + + +def addon_srm_show(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") + + +def addon_vr_update(cmd, client: AVSClient, resource_group_name, private_cloud, vrs_count: int): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonVrProperties + properties = AddonVrProperties(vrs_count=vrs_count) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", properties=properties) + + +def addon_hcx_update(cmd, client: AVSClient, resource_group_name, private_cloud, offer: str): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonHcxProperties + properties = AddonHcxProperties(offer=offer) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", properties=properties) + + +def addon_srm_update(cmd, client: AVSClient, resource_group_name, private_cloud, license_key: str): + from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonSrmProperties + properties = AddonSrmProperties(license_key=license_key) + return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", properties=properties) + + +def addon_vr_delete(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") + + +def addon_hcx_delete(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") + + +def addon_srm_delete(cmd, client: AVSClient, resource_group_name, private_cloud): + return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml index 3d948fa8cfd..45f7b190b4f 100644 --- a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml @@ -39,13 +39,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:32 GMT + - Thu, 03 Jun 2021 21:25:50 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AtSrx_18wd1AuaFnsKJP3vY; expires=Thu, 29-Apr-2021 21:46:32 GMT; path=/; + - fpc=Ar6DUEZ-Y_REtKLn10PQL8Q; expires=Sat, 03-Jul-2021 21:25:51 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBdXv4E8rOfcBz5YNFPg3qIGpoKLD0KbK5jPkzHSU6W3uFH09-eRTNl3oLBRzdhoAOy3ilqsVAK-a2tymxEFVixl5dyP-QEUMIIsKEAn5zK5HSfXfmXXTv8DE0xyFA5ZpbdTTVL7OPUFYjsjvzGKQhg4MKlkZm1eZ_JKIFzTYXrQgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_buZmUg8fcc1z1kOugbjDYCdjg5NYasqgfzKdi2TUCitY_FvOMzxqmUAf530AZt2fkn2RCOL4JvNNiOgga0rIPF_OE8IcS7q7WPDeQXc9-zAs32Ho_SshT6eIZpxDDapSDuiiRywkOQYOXVuslsgwRO5Z-jBuG7q59qtLyaWQyogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -54,7 +54,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.21 - NCUS ProdSlices status: code: 200 message: OK @@ -74,12 +74,12 @@ interactions: ParameterSetName: - --location User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: POST - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/centralus/checkQuotaAvailability?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/centralus/checkQuotaAvailability?api-version=2021-06-01 response: body: - string: '{"hostsRemaining":{"gp":980,"he":980},"quotaEnabled":"Enabled"}' + string: '{"hostsRemaining":{"gp":976,"he":980},"quotaEnabled":"Enabled"}' headers: cache-control: - no-cache @@ -88,21 +88,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:34 GMT + - Thu, 03 Jun 2021 21:25:54 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: BC47B999904A45429E894D674702F3CF Ref B: PDX31EDGE0122 Ref C: 2021-06-03T21:25:51Z' status: code: 200 message: OK @@ -146,13 +144,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:34 GMT + - Thu, 03 Jun 2021 21:25:55 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Al-E3t-zA3JFt36QY21bSTs; expires=Thu, 29-Apr-2021 21:46:34 GMT; path=/; + - fpc=AnVw8SWsgd9FhNjfo4GBMYs; expires=Sat, 03-Jul-2021 21:25:55 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrQyHTFQlOBx9WTGX5HPuNKJtHu0h3V-v-XNoA-WsFXok8kfeuk0pLQ_vQi0jRm4foblr6V9NQeZEqhKvdA0Yt393bwr8asYs0NX3b93MF6RIruVtgtd6zkd5AvLlF2nxdfXftriFExiXOrHhcjfdYQIDkT3F_eKHhOQNn_lcX-tUgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrb9PrOU0nLmf76kZI1UKtXtUmiCL1bDiSh7z-p2RoQX3tPbQ4vH_RiN83RCsDdsrF44sKO7WmuKJ_LFXGu2hSGJHRvUzohhZpjXJXx3hS0TKDD7wzay5Uu4z1FjRnlgmnLSficU3lnHwF1RygeyWoO-UySFXI6pY1ISGO4ayVbrcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -161,7 +159,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.21 - EUS ProdSlices status: code: 200 message: OK @@ -181,9 +179,9 @@ interactions: ParameterSetName: - --location User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: POST - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/centralus/checkTrialAvailability?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/centralus/checkTrialAvailability?api-version=2021-06-01 response: body: string: '{"availableHosts":0,"status":"TrialDisabled"}' @@ -195,23 +193,21 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:36 GMT + - Thu, 03 Jun 2021 21:25:56 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' + x-msedge-ref: + - 'Ref A: 4B202D8AE34E4021941DF49D102DD462 Ref B: PDX31EDGE0112 Ref C: 2021-06-03T21:25:55Z' status: code: 200 message: OK @@ -255,13 +251,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:36 GMT + - Thu, 03 Jun 2021 21:25:56 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Ag0HiEDwq9hBoJDsvM-wsB0; expires=Thu, 29-Apr-2021 21:46:36 GMT; path=/; + - fpc=AmU7i0S_j85GsQQHuA2RIFg; expires=Sat, 03-Jul-2021 21:25:56 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrSHBfS5uAG3pfyBDfEur6kEdlKH3sI6Hpp4faJ4Gw_6tpCuBxwor-Bn6eCAyfki7nxGAkbuBnLm-jxY_ii7WC3cMMwm7mbb_liFrV49e9ttibqqfe_b1xk2jUQ66dSRoitsuDDQxludKiY7z_Vi4XDTGBOFJjxIUcW9gZEna4HdIgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr7L0ff6RnUhGq-qmVEb_7ZiDrX6t-FGsbrhSeMM2fIaKz1voC9PBTkOwTNWbPKLCFVvcLmP0COtDCD8P9rvGla_P5UXBzWP7twP6RuFJFbD-m2zbR9C8PjEP5QJt4PwWLoxla-OcE4Wz9LRM72YXY9YIifwkfo-L90F7pq92bKeggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -270,7 +266,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - NCUS ProdSlices + - 2.1.11722.21 - EUS ProdSlices status: code: 200 message: OK @@ -288,9 +284,9 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds?api-version=2021-06-01 response: body: string: '{"value":[]}' @@ -302,17 +298,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:37 GMT + - Thu, 03 Jun 2021 21:25:57 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 8B63EBE9422F49829388AFF9E4D5BC4E Ref B: PDX31EDGE0110 Ref C: 2021-06-03T21:25:56Z' status: code: 200 message: OK @@ -356,13 +354,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:37 GMT + - Thu, 03 Jun 2021 21:25:57 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Ak3_0rMSf-RBnQ0x2umKEZ8; expires=Thu, 29-Apr-2021 21:46:38 GMT; path=/; + - fpc=AtAZno-QR05GuofpoPnHzug; expires=Sat, 03-Jul-2021 21:25:57 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_FFcFrBVhK_GVO-ROxhpzCzR_3gDKjADhDUZfMkErm87a5ES_vuOwG2IJL1iLD8U8OdOqZCu8Yqw7gyOQUH19t7Y7nnKqwV03Pbz_oKSub5cc2dv7FDjHy43h0GNQRdyLLdfzE0LqYlRIB76M6Lsxc2znb1DQR8NpTT2vB-oYDEgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8vfX9fzzoM5_MEVUXTfCIIQMla7K4kvI-K8w-GRXTdWPNrheqiuj8VZVG8FRZCvOHhjbKAxTWe2RnaM-b7vDK8Ydfyll3fR6NFzk_ufFIDz-E-_NAHB9gbnRM9XLdjpwsZZryG0IlJiWwPs0ssA_CwCKHmMCSf3R5Zpi87xMx40gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -371,13 +369,13 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - NCUS ProdSlices + - 2.1.11722.26 - WUS2 ProdSlices status: code: 200 message: OK - request: body: '{"location": "centralus", "tags": {}, "sku": {"name": "av20"}, "properties": - {"managementCluster": {"clusterSize": 4}, "internet": "Disabled", "networkBlock": + {"managementCluster": {"clusterSize": 3}, "internet": "Disabled", "networkBlock": "192.168.48.0/22", "vcenterPassword": "UpfBXae9ZquZSDXk(", "nsxtPassword": "5rqdLj4GF3cePUe6("}}' headers: Accept: @@ -396,35 +394,37 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost16.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/24","provisioningState":"Building","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/24","provisioningState":"Building","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 cache-control: - no-cache content-length: - - '945' + - '922' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:45 GMT + - Thu, 03 Jun 2021 21:26:03 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' + x-msedge-ref: + - 'Ref A: 7ED20D716DE44BEA94C3ABFF01E1B888 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:25:58Z' status: code: 201 message: Created @@ -443,12 +443,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":0,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":0,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -457,21 +457,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:46:56 GMT + - Thu, 03 Jun 2021 21:26:13 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: CBDFF4FC83C147E1BA1ECF36F6756664 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:26:14Z' status: code: 200 message: OK @@ -490,12 +488,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":0,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":0,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -504,21 +502,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:07 GMT + - Thu, 03 Jun 2021 21:26:24 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 31DA2B65CC624D16985FCB8A183FEAD7 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:26:24Z' status: code: 200 message: OK @@ -537,12 +533,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":88.75,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":88.75,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -551,21 +547,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:17 GMT + - Thu, 03 Jun 2021 21:26:34 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 2F2F2FAF3CA64DAAA859D351030E9EEA Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:26:34Z' status: code: 200 message: OK @@ -584,12 +578,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":88.75,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":88.75,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -598,21 +592,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:27 GMT + - Thu, 03 Jun 2021 21:26:44 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: E7D4423613C54B719B84620F2BB38398 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:26:44Z' status: code: 200 message: OK @@ -631,12 +623,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -645,21 +637,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:38 GMT + - Thu, 03 Jun 2021 21:26:55 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: BEDFF789B1DB490B96F75855F27FD836 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:26:55Z' status: code: 200 message: OK @@ -678,12 +668,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -692,21 +682,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:49 GMT + - Thu, 03 Jun 2021 21:27:05 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 17726E9550D14FD9A89A67C18670DD61 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:05Z' status: code: 200 message: OK @@ -725,12 +713,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -739,21 +727,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:47:59 GMT + - Thu, 03 Jun 2021 21:27:15 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: A9CA9AD0F3EC4B2EBA9EAD0FA91C862C Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:15Z' status: code: 200 message: OK @@ -772,12 +758,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -786,21 +772,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:09 GMT + - Thu, 03 Jun 2021 21:27:25 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 51FEA5C9B2FD4B6E94503A72C36DCA32 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:26Z' status: code: 200 message: OK @@ -819,12 +803,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -833,21 +817,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:20 GMT + - Thu, 03 Jun 2021 21:27:36 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 19615D3FB3C0459FB6D2E56E0EB9AB42 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:36Z' status: code: 200 message: OK @@ -866,12 +848,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -880,21 +862,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:29 GMT + - Thu, 03 Jun 2021 21:27:46 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: D85E053DC94C4476BC2CE75FCA3DAD88 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:46Z' status: code: 200 message: OK @@ -913,12 +893,12 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -927,21 +907,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:41 GMT + - Thu, 03 Jun 2021 21:27:56 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 6EC09E44CB21452FB6C458924953637D Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:27:57Z' status: code: 200 message: OK @@ -960,35 +938,33 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:48:39.8295481+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/618db719-3b52-44f3-8664-3abac4bd7a33","name":"618db719-3b52-44f3-8664-3abac4bd7a33","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost16.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-03-30T21:46:42.1863195+00:00","status":"Succeeded"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '2034' + - '387' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:50 GMT + - Thu, 03 Jun 2021 21:28:07 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: A05D6EA049C54FFAAD606994BE263539 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:28:07Z' status: code: 200 message: OK @@ -1007,35 +983,33 @@ interactions: - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost16.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"endTime":"2021-06-03T21:28:03.4821553+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/7202cf35-fca2-491b-8aa5-886816d038f9","name":"7202cf35-fca2-491b-8aa5-886816d038f9","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-03T21:25:41.6805166+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '1586' + - '2011' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:51 GMT + - Thu, 03 Jun 2021 21:28:17 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 56210098E501446FB02AC43C18166E6E Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:28:17Z' status: code: 200 message: OK @@ -1044,400 +1018,46 @@ interactions: headers: Accept: - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - win32 - x-client-SKU: - - Python - x-client-Ver: - - 1.2.3 - method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - max-age=86400, private - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:48:52 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=Av5RMHZ1o7NNjdIWkuMtXO8; expires=Thu, 29-Apr-2021 21:48:53 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrpoyKUX9sVOzqzdkyEqzJgpsfsR2JjMw2C3P4y0pX5j6NwfNsWSHGQXQh8fryERt6jClbGC-lUx1593qjiPumzfSdldOwnIbyhURHYEkUo_eC9ZrpOO0_yCX8DswxqcU67vjFM-fdxopD-7YbLrhRQ5expV3hmKfBw_Yu5oglwFQgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json Accept-Encoding: - gzip, deflate CommandName: - - vmware private-cloud list + - vmware private-cloud create Connection: - keep-alive ParameterSetName: - - -g + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost16.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}]}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1598' + - '1563' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:48:54 GMT + - Thu, 03 Jun 2021 21:28:17 GMT expires: - '-1' pragma: - no-cache - server: - - nginx - 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-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - win32 - x-client-SKU: - - Python - x-client-Ver: - - 1.2.3 - method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - max-age=86400, private - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:48:54 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=Au0a8dKYP9lNiWWLhkanLjI; expires=Thu, 29-Apr-2021 21:48:54 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevryiShb-zQgjdBEnLfcJ-ciMa9zgL7mxRO2Fl41ly-E72bvvqEfUIr2FMfDrLPPk1-C6cOqp2V8fb9HitRP-zivGWM4waWbgKbnVxf6wpgiPJsnQjTGzNC6lHpkoYYJk8JPzGARZAnl4XO4LtDyibYnkV6KcjF_tc6THmS6MeriYYgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.11562.10 - NCUS ProdSlices - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vmware private-cloud rotate-vcenter-password - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -c - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword?api-version=2021-01-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - content-type: - - text/html - date: - - Tue, 30 Mar 2021 21:48:56 GMT - expires: - - '-1' - location: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword/operationresults/508eb6f0-7313-4d75-aab8-d3c166ea1632?api-version=2021-01-01-preview - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - vmware private-cloud rotate-vcenter-password - Connection: - - keep-alive - ParameterSetName: - - -g -c - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword/operationresults/508eb6f0-7313-4d75-aab8-d3c166ea1632?api-version=2021-01-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-type: - - text/html - date: - - Tue, 30 Mar 2021 21:49:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - win32 - x-client-SKU: - - Python - x-client-Ver: - - 1.2.3 - method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 - response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - max-age=86400, private - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:49:27 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AtzOruJLC4FKoCKKBUnbtrk; expires=Thu, 29-Apr-2021 21:49:27 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrc3YlVCajwVv5ygyBBm_B0WJynWoZynWX5f5XP4U4WXBk9415sEQLB-OkkAzL_om8LvCmnFDpkjc2CBnbExOGdLPcrcP5EmYL1bu56E0CUX8MGAG9YzPGvrTc8dx0gwDuGmWcQNIoG2RKbepZzJ3OZ_xO1U3heEfWDPmyNH942iAgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-ests-server: - - 2.1.11562.10 - SCUS ProdSlices + x-msedge-ref: + - 'Ref A: 08C50C88440E4A739AA84C1DA8C37913 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:28:17Z' status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vmware private-cloud rotate-nsxt-password - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -c - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword?api-version=2021-01-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - content-type: - - text/html - date: - - Tue, 30 Mar 2021 21:49:28 GMT - expires: - - '-1' - location: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword/operationresults/9e982cb4-8e56-4f41-8a37-1c7dc9ed54ca?api-version=2021-01-01-preview - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - vmware private-cloud rotate-nsxt-password - Connection: - - keep-alive - ParameterSetName: - - -g -c - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword/operationresults/9e982cb4-8e56-4f41-8a37-1c7dc9ed54ca?api-version=2021-01-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-type: - - text/html - date: - - Tue, 30 Mar 2021 21:49:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 204 - message: No Content - request: body: null headers: @@ -1478,13 +1098,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:00 GMT + - Thu, 03 Jun 2021 21:28:17 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Aqj8gnTf17pIqIyKpjg3eL4; expires=Thu, 29-Apr-2021 21:50:00 GMT; path=/; + - fpc=AjDdeGOhVX1EsePTm3E2YL0; expires=Sat, 03-Jul-2021 21:28:18 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevruhs2q7NIN-fIET7KirgUNV1-nTsMVjnmwntkY1ka6lFGlTBA2m8jpEsC6-FsjtBfVQWVBqKElx7Xf7i796uqLiHlBy_KZp-N4rElnCXARHZuyHyGWdQQ7TKxNod5sTpQOAHI3eDuLTa3b-ftboE7YfxfBWXV7JQwx858y2oJmLwgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrURoIupyrRWlGOKbVjeuP_qSV-UGeTVkDdEq_fiThNlHlWxzukaHdEn-IwSOWTk_sbA9AUWbuFQZSNfY-9seWcroEP9OfQw1G7adbNo4DzEZqjKwvBuE3worRRTLn3-DgJIl05MjTYIEiPYdUQbCXuYvbBlomPOfKlJDUnxbLi1AgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1493,7 +1113,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.21 - NCUS ProdSlices status: code: 200 message: OK @@ -1505,152 +1125,39 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - vmware hcx-enterprise-site list + - vmware private-cloud list Connection: - keep-alive ParameterSetName: - - -g -c - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites?api-version=2021-01-01-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:50:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - 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-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive + - -g User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - win32 - x-client-SKU: - - Python - x-client-Ver: - - 1.2.3 + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds?api-version=2021-06-01 response: body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' - cache-control: - - max-age=86400, private - content-length: - - '131' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:50:02 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AmwR9pn5RCVOha3xt3mW_zs; expires=Thu, 29-Apr-2021 21:50:02 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_2VZMduAQrAGPw9r5jqadrnk8vusDr2HkkAZKAfdXLdvOUZIIE9kZdOI6QkY5NkmF8mEiemoADjEAmvD5IGDcDcvpXPgpdqLLVGtX4EL1VAhm_d0ZDHiYVZQEEOLA-QYbKfQxSgWKpJRD9xemjclrTwo5HPDyx7Pn3NhEB6Zv98gAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices - status: - code: 200 - message: OK -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vmware hcx-enterprise-site create - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - ParameterSetName: - - -g -c -n - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"2494af8b56b246c59a5b218f73d70288","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}]}' headers: cache-control: - no-cache content-length: - - '379' + - '1575' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:03 GMT + - Thu, 03 Jun 2021 21:28:18 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-msedge-ref: + - 'Ref A: 5939D40B70BD40A48A33F45875DF95F0 Ref B: PDX31EDGE0112 Ref C: 2021-06-03T21:28:18Z' status: code: 200 message: OK @@ -1694,13 +1201,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:04 GMT + - Thu, 03 Jun 2021 21:28:18 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AoL8MYVmzjtIrqkQYEa-j2E; expires=Thu, 29-Apr-2021 21:50:04 GMT; path=/; + - fpc=ArOnZh7S9JtGr0f5XL6P1QU; expires=Sat, 03-Jul-2021 21:28:19 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMSwBjgWkZFvjYb_LF7RSPnXNb_2yjsQ6BahyJypn2cuTu9F1_OtS8YWRux5JVESlOmy66HeWr6NCsxIWI2AEr8lfjrmruzk-EOwmV6rm0f7rvsPkhQv9Si9mxEadvwLR36kz0s_kiXAG0By6ZS3xgz6tzZTJKe-Fb3GUHCn6ilEgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrQLMIMBrJe2IzKY_3C3NxUGNlnH8wNgP9KIq2Iz7X4xOzHgfgA3VtympT_oo_ZUvWwzBtkvj9PRVl-XGx9EdYBOFPC9eb4wNx38rg-0yP_W0Fy_iAetUYk9xsEuzIKFSO5BOYCQ0-HYJMA4wG8WKdb2akD3AspbMA9lqGJ46e7EcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1709,7 +1216,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.21 - EUS ProdSlices status: code: 200 message: OK @@ -1721,149 +1228,90 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - vmware hcx-enterprise-site list + - vmware private-cloud rotate-vcenter-password Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - -g -c User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites?api-version=2021-01-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"2494af8b56b246c59a5b218f73d70288","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}]}' - headers: - cache-control: - - no-cache - content-length: - - '391' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:50:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - 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-Charset: - - utf-8 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - return-client-request-id: - - 'true' - x-client-CPU: - - x64 - x-client-OS: - - win32 - x-client-SKU: - - Python - x-client-Ver: - - 1.2.3 - method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword?api-version=2021-06-01 response: - body: - string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' - headers: - access-control-allow-methods: - - GET, OPTIONS - access-control-allow-origin: - - '*' + body: + string: '' + headers: cache-control: - - max-age=86400, private + - no-cache content-length: - - '131' + - '0' content-type: - - application/json; charset=utf-8 + - text/html date: - - Tue, 30 Mar 2021 21:50:05 GMT - p3p: - - CP="DSP CUR OTPi IND OTRi ONL FIN" - set-cookie: - - fpc=AgkK82YtyGRFu6J6U2jVu8c; expires=Thu, 29-Apr-2021 21:50:05 GMT; path=/; - secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0YLd8HaTaqY3xE4j8OGY5-iMxOJ8RrWVrikwoHvNhsZ5Jwo80qKZjN2P6MY0i8FswEEolik3JWkraf6YOTFeyiYx50EREqLjgBseF2v28UxqewBCJrzgDPtQb9j5ANr9KLkmeR1utbEqwXUsdqG9dDJunFgHhDNgnyOtxrL3a5kgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + - Thu, 03 Jun 2021 21:28:20 GMT + expires: + - '-1' + location: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword/operationresults/dd88ae15-28a0-4310-8aa0-2f3de328ec9c?api-version=2021-06-01 + pragma: + - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-ests-server: - - 2.1.11562.10 - NCUS ProdSlices + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 3F61849BD0BA48A29B88FDDB3AD1A02C Ref B: PDX31EDGE0122 Ref C: 2021-06-03T21:28:19Z' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - vmware hcx-enterprise-site show + - vmware private-cloud rotate-vcenter-password Connection: - keep-alive ParameterSetName: - - -g -c -n + - -g -c User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateVcenterPassword/operationresults/dd88ae15-28a0-4310-8aa0-2f3de328ec9c?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"2494af8b56b246c59a5b218f73d70288","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}' + string: '' headers: cache-control: - no-cache - content-length: - - '379' content-type: - - application/json; charset=utf-8 + - text/html date: - - Tue, 30 Mar 2021 21:50:06 GMT + - Thu, 03 Jun 2021 21:28:50 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 5252D15A57284DAFB1BEBB5F6BF8B8C2 Ref B: PDX31EDGE0122 Ref C: 2021-06-03T21:28:51Z' status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: null headers: @@ -1904,13 +1352,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:07 GMT + - Thu, 03 Jun 2021 21:28:52 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AhcrgBoQkuZEvPO90Mi3Iys; expires=Thu, 29-Apr-2021 21:50:07 GMT; path=/; + - fpc=AhrGyKpw4xlAjgNgzgj_4Gs; expires=Sat, 03-Jul-2021 21:28:52 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrO4IK7-fCAmT6tigzS315HTLnYmo01Vxr7iW-gmfgSptpYI_YH5lPF-beZUcQT44OodZPWPgt3Nu8n6fFanZmCKkObRNWx9oPBoIXl35ePADk-apey9y3k5JcUZCQ5s5kGf4aJ03wgtxw8SyJe-ZzcgFWbbGznYSOi87FIuotwzEgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevriYTRSP4jmRVLIwrQw_EHRu0gyzbE1KftGiRElombfJU9pgXjId4sghfFSTyaXIIE7tGpi0zOcqiAbsoyFy4EGTLSmM9nUzHBL74mgQKdLHxzDYy3wILcC7D1l6wc7AEPkg-dprzj6w2CRf_UsSKv8MgSb4dosjW2yo6i9NfZA5AgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1919,7 +1367,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - SCUS ProdSlices + - 2.1.11722.26 - EUS ProdSlices status: code: 200 message: OK @@ -1931,17 +1379,17 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - vmware hcx-enterprise-site delete + - vmware private-cloud rotate-nsxt-password Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - -g -c -n + - -g -c User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-01-01-preview + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword?api-version=2021-06-01 response: body: string: '' @@ -1953,22 +1401,68 @@ interactions: content-type: - text/html date: - - Tue, 30 Mar 2021 21:50:08 GMT + - Thu, 03 Jun 2021 21:28:53 GMT expires: - '-1' + location: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword/operationresults/8c48a252-e4f6-4d72-a211-3de0855e0a2c?api-version=2021-06-01 pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: A101D04A8F024CC5BA705B9DA7FA85DB Ref B: PDX31EDGE0109 Ref C: 2021-06-03T21:28:52Z' status: - code: 200 - message: OK + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud rotate-nsxt-password + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/rotateNsxtPassword/operationresults/8c48a252-e4f6-4d72-a211-3de0855e0a2c?api-version=2021-06-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - text/html + date: + - Thu, 03 Jun 2021 21:29:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E879511427DB42ECBBAFEB02928D9FAC Ref B: PDX31EDGE0109 Ref C: 2021-06-03T21:29:23Z' + status: + code: 204 + message: No Content - request: body: null headers: @@ -2009,13 +1503,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:08 GMT + - Thu, 03 Jun 2021 21:29:24 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Aqnat8_7frRLijJFXv_hv5E; expires=Thu, 29-Apr-2021 21:50:08 GMT; path=/; + - fpc=AtCMGGYxth5MnNeuB2KRIXA; expires=Sat, 03-Jul-2021 21:29:25 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrlKn_Nvw4CoEujGCQ7QNvLTD3V4R3qTN_aCff5dVixWfwXjm1FHtiNhe-gmnWu5A0BcV0_oz1Q2zUjEjM6H7MFrOHQ5lV7cIlPm6rNuDZ30c60RfiuatTBqXgDz7ftuQ3kolOUfjlU1mztK67f3HPs7m7oDRt0cq_CjYiqerdiGUgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrLVidRp3AlH_mWudO5vpq4_HO6Xs2r7Gri_n682w0DoTfv7hDYOgQkuRyC8tbzITyi4TN5CohFW9BYmTouoSRw3tbYxkgKfIjleiR32t3aSIYHYis514l-yMfZ2oCXnCKQLNrSjppnHy6NBhxpTB0LoDmuX2rtU7o-JlT7lvD31EgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -2024,12 +1518,12 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.26 - EUS ProdSlices status: code: 200 message: OK - request: - body: '{"properties": {"managementCluster": {"clusterSize": 3}, "internet": "Disabled"}}' + body: '{"properties": {"managementCluster": {"clusterSize": 4}, "internet": "Disabled"}}' headers: Accept: - application/json @@ -2046,35 +1540,37 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost16.mp01.mock01.vmcp.vs.management"],"provisioningState":"Updating"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Updating"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932?api-version=2021-06-01 cache-control: - no-cache content-length: - - '1584' + - '1608' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:09 GMT + - Thu, 03 Jun 2021 21:29:27 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' + x-msedge-ref: + - 'Ref A: 6CA833803C834A7184E78364BEFE5188 Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:29:25Z' status: code: 201 message: Created @@ -2092,12 +1588,12 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae","name":"a135a601-f99b-45a8-8810-010b90b3deae","percentComplete":0,"startTime":"2021-03-30T21:50:06.2399435+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932","name":"a5515a88-124d-4650-b96b-10b613dd7932","percentComplete":0,"startTime":"2021-06-03T21:29:05.6686202+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -2106,67 +1602,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - 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: - - vmware private-cloud update - Connection: - - keep-alive - ParameterSetName: - - -g -n --cluster-size - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae","name":"a135a601-f99b-45a8-8810-010b90b3deae","percentComplete":50,"startTime":"2021-03-30T21:50:06.2399435+00:00","status":"Building"}' - headers: - cache-control: - - no-cache - content-length: - - '386' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:50:30 GMT + - Thu, 03 Jun 2021 21:29:38 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 6EC50F00DC5C4D82B447694BE07E2FC6 Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:29:37Z' status: code: 200 message: OK @@ -2184,35 +1632,33 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae","name":"a135a601-f99b-45a8-8810-010b90b3deae","percentComplete":75,"startTime":"2021-03-30T21:50:06.2399435+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932","name":"a5515a88-124d-4650-b96b-10b613dd7932","percentComplete":0,"startTime":"2021-06-03T21:29:05.6686202+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '386' + - '385' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:40 GMT + - Thu, 03 Jun 2021 21:29:48 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 48A2BA4DE0F74B9CB81D642BD3F0D727 Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:29:48Z' status: code: 200 message: OK @@ -2230,35 +1676,33 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae","name":"a135a601-f99b-45a8-8810-010b90b3deae","percentComplete":75,"startTime":"2021-03-30T21:50:06.2399435+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932","name":"a5515a88-124d-4650-b96b-10b613dd7932","percentComplete":0,"startTime":"2021-06-03T21:29:05.6686202+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '386' + - '385' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:50:50 GMT + - Thu, 03 Jun 2021 21:29:58 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 907862EC793B4CF58622DAB73F9152BB Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:29:58Z' status: code: 200 message: OK @@ -2276,35 +1720,33 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:50:54.7831923+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a135a601-f99b-45a8-8810-010b90b3deae","name":"a135a601-f99b-45a8-8810-010b90b3deae","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-03-30T21:50:06.2399435+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:30:03.3674197+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a5515a88-124d-4650-b96b-10b613dd7932","name":"a5515a88-124d-4650-b96b-10b613dd7932","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-03T21:29:05.6686202+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '1987' + - '2058' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:01 GMT + - Thu, 03 Jun 2021 21:30:09 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 2CF32CAFCA1B46A59B651E56FF502D93 Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:30:09Z' status: code: 200 message: OK @@ -2322,35 +1764,33 @@ interactions: ParameterSetName: - -g -n --cluster-size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1539' + - '1610' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:01 GMT + - Thu, 03 Jun 2021 21:30:09 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 991FDA8C9E9C41AF97DA6C3F8D1CAD4D Ref B: PDX31EDGE0114 Ref C: 2021-06-03T21:30:09Z' status: code: 200 message: OK @@ -2394,13 +1834,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:02 GMT + - Thu, 03 Jun 2021 21:30:09 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AjDma5aqRxJKr5AgyMjmysM; expires=Thu, 29-Apr-2021 21:51:02 GMT; path=/; + - fpc=Agc3TmgzluRGq78QKoM3viM; expires=Sat, 03-Jul-2021 21:30:10 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr-epNX4orCmGJrC5N2AncikEq3WnjK5soQnWC6mCyfLgfgmPaFFXoWZaGkjy39BlisZK6VxZjtMwnmVtDw7HxQjIIBOhSmeDw1OJSdwD_kiU53EnAFP5KFp_CPJiB0h9r7LCbaAz9T7z46xUtB3dAhqgBsbBEYAaq6WZKKdQbnEUgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrCtz6YUX1PLnNcAxYxN38vlWrtV9g8x7UYS-usVrup29jQoVVKZAeNQh1hSXUYRG8_1CceAR0LQ-wN-Re9OJV3-xn9mHqzyQbwgQrjkZvmtzsnyLib40HItNBC6M6KrCeB7Jl7g6zqwjcaV-pFAjMch4Wl3cN2YtOdheOgK1TNRYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -2409,7 +1849,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - SCUS ProdSlices + - 2.1.11722.26 - NCUS ProdSlices status: code: 200 message: OK @@ -2431,35 +1871,37 @@ interactions: ParameterSetName: - -g -n --internet User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e3964234-061a-4fdc-a912-b164c626d2e6?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c?api-version=2021-06-01 cache-control: - no-cache content-length: - - '1538' + - '1609' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:04 GMT + - Thu, 03 Jun 2021 21:30:10 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1197' + x-msedge-ref: + - 'Ref A: 8ACAB2A728114282BF9D1CFBE967E70B Ref B: PDX31EDGE0120 Ref C: 2021-06-03T21:30:10Z' status: code: 201 message: Created @@ -2477,12 +1919,12 @@ interactions: ParameterSetName: - -g -n --internet User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e3964234-061a-4fdc-a912-b164c626d2e6?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e3964234-061a-4fdc-a912-b164c626d2e6","name":"e3964234-061a-4fdc-a912-b164c626d2e6","percentComplete":11,"startTime":"2021-03-30T21:51:00.7330909+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c","name":"1638ac84-b1b4-4a86-99ac-46740c88c73c","percentComplete":10,"startTime":"2021-06-03T21:29:49.2793732+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -2491,21 +1933,63 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:13 GMT + - Thu, 03 Jun 2021 21:30:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 0D9DF3BB39A7414FA0726F5242BD91B9 Ref B: PDX31EDGE0120 Ref C: 2021-06-03T21:30:21Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c","name":"1638ac84-b1b4-4a86-99ac-46740c88c73c","percentComplete":100,"startTime":"2021-06-03T21:29:49.2793732+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 03 Jun 2021 21:30:31 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 85180DD0956940BEAEE1FB8C0B4A8494 Ref B: PDX31EDGE0120 Ref C: 2021-06-03T21:30:31Z' status: code: 200 message: OK @@ -2523,35 +2007,33 @@ interactions: ParameterSetName: - -g -n --internet User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e3964234-061a-4fdc-a912-b164c626d2e6?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:51:20.0840204+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e3964234-061a-4fdc-a912-b164c626d2e6","name":"e3964234-061a-4fdc-a912-b164c626d2e6","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-03-30T21:51:00.7330909+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:30:28.3548267+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1638ac84-b1b4-4a86-99ac-46740c88c73c","name":"1638ac84-b1b4-4a86-99ac-46740c88c73c","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-03T21:29:49.2793732+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '1986' + - '2057' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:25 GMT + - Thu, 03 Jun 2021 21:30:41 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 42CBBC41C61E468CA6933F338C408155 Ref B: PDX31EDGE0120 Ref C: 2021-06-03T21:30:41Z' status: code: 200 message: OK @@ -2569,35 +2051,33 @@ interactions: ParameterSetName: - -g -n --internet User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1538' + - '1609' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:25 GMT + - Thu, 03 Jun 2021 21:30:41 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: D46A11FEB8F94B2D8FC2B70BA1B9BD57 Ref B: PDX31EDGE0120 Ref C: 2021-06-03T21:30:42Z' status: code: 200 message: OK @@ -2641,13 +2121,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:25 GMT + - Thu, 03 Jun 2021 21:30:42 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=ArTlReUXxQ9InR-RnunU_5k; expires=Thu, 29-Apr-2021 21:51:26 GMT; path=/; + - fpc=AiT0zbd_kwpHiE-NG38-dQ0; expires=Sat, 03-Jul-2021 21:30:42 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrjIQZCGeB4D-Ma5JM5oA2Ox4XWpQXSrzL57-wPtWGeg33YSN8w78dhJolwAnJHgKLFJM2gNQB_Pv2_2Z3-nwpM4uuvthUY_8alxvxwPsul0hW0CDNKd1gGm2TR73-WlKiAi5dI-AVLEJqHHuTA5p7aAV8uS1gTUMGibYX_jip1nAgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrwPS5G6hOF5lTTGN7lBm3T3FHspuWWf2XbNboTH65Qcgb2maci_HhWcJiMqZ7BNmmoXxkDd-pJxE47-TaX05HF9nysU3zHYk2MsdQ6_tCm6bJtEbXPjd11o0S3DibT9AOuXbQWikpHDLe-A7lLkgfT14jw_jOvyggV3JVpT6JilEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -2656,7 +2136,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices + - 2.1.11722.26 - WUS2 ProdSlices status: code: 200 message: OK @@ -2678,12 +2158,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname","name":"myauthname","properties":{"expressRouteAuthorizationId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/authorizations/avs_resource_myauthname","expressRouteAuthorizationKey":"f667dab8-6414-471c-bff7-310c7678e33a","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/authorizations"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname","name":"myauthname","properties":{"expressRouteAuthorizationId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/authorizations/avs_resource_myauthname","expressRouteAuthorizationKey":"1068feb7-16d6-4891-a630-7693d571e897","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/authorizations"}' headers: cache-control: - no-cache @@ -2692,23 +2172,21 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:27 GMT + - Thu, 03 Jun 2021 21:30:43 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' + x-msedge-ref: + - 'Ref A: C07708B6D7F940D686B29965EA349AE9 Ref B: PDX31EDGE0122 Ref C: 2021-06-03T21:30:43Z' status: code: 200 message: OK @@ -2752,13 +2230,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:27 GMT + - Thu, 03 Jun 2021 21:30:43 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Ar0o_wkcl_VKv95jV2LXwkQ; expires=Thu, 29-Apr-2021 21:51:28 GMT; path=/; + - fpc=AvaGWGy8T6xNkeQ4l4ucA_Y; expires=Sat, 03-Jul-2021 21:30:43 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr5wlzy7L-FqGC6OGqG9j6iQtK_XYp9zkIucaPjzOnD3vfG0dUbGvK-6HjRQX3pqMHMkJSwCk3TlxK2obWp4Brpu5xwd2Aii7hBQyiGUkfmzUwN0KwbEVplHWohgZSGjEcNuMChLlu8e1g0ZFuO-Cu4KSNEljeqj6KUvZ9qUTGnyQgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrywjfrLP5bXNcCQ_FogR8ymLyK7FoSxu21EE6UbVu67PjMkXzQgbQoLMZcr7aLkdFkagvY325VZWMs9eJhAkIZzWZPFaYiQ-Hf8cQxlQBAUYloVcyYmhVGJN3t0plPMF3efEfjhWkxvgJNdZdNiIihK7HL4DztT8tghYTA0kWLwAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -2767,7 +2245,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - SCUS ProdSlices + - 2.1.11722.26 - NCUS ProdSlices status: code: 200 message: OK @@ -2787,9 +2265,9 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2021-06-01 response: body: string: '' @@ -2801,19 +2279,21 @@ interactions: content-type: - text/html date: - - Tue, 30 Mar 2021 21:51:28 GMT + - Thu, 03 Jun 2021 21:30:45 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' + x-msedge-ref: + - 'Ref A: BB5F05C550B14A019B3DEF127FF9BA2F Ref B: PDX31EDGE0109 Ref C: 2021-06-03T21:30:44Z' status: code: 200 message: OK @@ -2857,13 +2337,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:29 GMT + - Thu, 03 Jun 2021 21:30:44 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=ArT1Yt8h2XFFv16RTH3Jh_o; expires=Thu, 29-Apr-2021 21:51:29 GMT; path=/; + - fpc=Ar_NF3NUz-1BvIs1GZwM040; expires=Sat, 03-Jul-2021 21:30:45 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrELch0l4p4G1CU6pwCkVGlSRn-kcI9inZdIPkO7XQLIVdqAz3CrvCr_llnzhi7YR--aqwho8ZjDAiGoqsCu39GrASe9txorMjrzFwEzGwqc4YIoICkdzaY-ea4urjnh-HhoOUERnTKqDT5S8nynwrTXy_OnNdFdfS8nnsRRGx0lUgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrR3eBLJIsVPF-6DT-_S39RAeXaiARi0ORW-G3Cu-BflERZcbe9_maNxXcb4zYZWQLJtJnkKXgivOk_9NY93uHwlDHfgpYx-tfTb4IHY_jnv0i5NNhqUo5c7hUAXo8OXyvturWL9zcP-4dX0p-FXRqz8zZTvlPcfdqz_DQh41wkcAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -2872,7 +2352,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - SCUS ProdSlices + - 2.1.11722.26 - SCUS ProdSlices status: code: 200 message: OK @@ -2891,41 +2371,39 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1538' + - '1609' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:30 GMT + - Thu, 03 Jun 2021 21:30:45 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: CEE786297D0F406CB01E9E5A6B65F5E7 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:30:45Z' status: code: 200 message: OK - request: body: '{"location": "centralus", "tags": {}, "sku": {"name": "av20"}, "properties": - {"managementCluster": {"clusterSize": 3}, "internet": "Enabled", "identitySources": + {"managementCluster": {"clusterSize": 4}, "internet": "Enabled", "identitySources": [{"name": "groupName", "alias": "groupAlias", "domain": "domain", "baseUserDN": "ou=baseUser", "baseGroupDN": "ou=baseGroup", "primaryServer": "ldaps://1.1.1.1:636", "ssl": "Disabled", "username": "someone", "password": "something"}], "circuit": @@ -2947,35 +2425,37 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799?api-version=2021-06-01 cache-control: - no-cache content-length: - - '1708' + - '1779' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:31 GMT + - Thu, 03 Jun 2021 21:30:46 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' + x-msedge-ref: + - 'Ref A: DCF855CFE78541F8BB9649482448FEF0 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:30:46Z' status: code: 201 message: Created @@ -2994,12 +2474,12 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2","name":"509ace65-1e1e-41c8-aca9-42b04016f1f2","percentComplete":10,"startTime":"2021-03-30T21:51:27.9213166+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799","name":"c91a9015-fadc-46e1-aba9-e8783c413799","percentComplete":10,"startTime":"2021-06-03T21:30:24.8469907+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3008,21 +2488,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:42 GMT + - Thu, 03 Jun 2021 21:30:56 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 211E8152AFFA4DAF91047B03F852CCF2 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:30:56Z' status: code: 200 message: OK @@ -3041,12 +2519,12 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2","name":"509ace65-1e1e-41c8-aca9-42b04016f1f2","percentComplete":50,"startTime":"2021-03-30T21:51:27.9213166+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799","name":"c91a9015-fadc-46e1-aba9-e8783c413799","percentComplete":50,"startTime":"2021-06-03T21:30:24.8469907+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3055,21 +2533,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:51:52 GMT + - Thu, 03 Jun 2021 21:31:06 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: B1C8FCCF76DE4693922B2678F9C12468 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:31:07Z' status: code: 200 message: OK @@ -3088,12 +2564,12 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2","name":"509ace65-1e1e-41c8-aca9-42b04016f1f2","percentComplete":100,"startTime":"2021-03-30T21:51:27.9213166+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799","name":"c91a9015-fadc-46e1-aba9-e8783c413799","percentComplete":100,"startTime":"2021-06-03T21:30:24.8469907+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3102,21 +2578,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:02 GMT + - Thu, 03 Jun 2021 21:31:16 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 74989891D5EE463CBC0822A98A20266E Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:31:17Z' status: code: 200 message: OK @@ -3135,35 +2609,33 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:51:27.9213166+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/509ace65-1e1e-41c8-aca9-42b04016f1f2","name":"509ace65-1e1e-41c8-aca9-42b04016f1f2","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-03-30T21:51:27.9213166+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:30:24.8469907+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/c91a9015-fadc-46e1-aba9-e8783c413799","name":"c91a9015-fadc-46e1-aba9-e8783c413799","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-03T21:30:24.8469907+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '2157' + - '2228' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:13 GMT + - Thu, 03 Jun 2021 21:31:27 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 23CCE311B0BB479099F8A2DAC6EFC8F2 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:31:27Z' status: code: 200 message: OK @@ -3182,35 +2654,33 @@ interactions: - -g -c -n --alias --domain --base-user-dn --base-group-dn --primary-server --username --password User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1709' + - '1780' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:13 GMT + - Thu, 03 Jun 2021 21:31:27 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 66A8067BA8064A50AA11C60621E1B40E Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:31:27Z' status: code: 200 message: OK @@ -3254,13 +2724,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:15 GMT + - Thu, 03 Jun 2021 21:31:28 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AgU2GnkPrpVAguFqgpK3MLA; expires=Thu, 29-Apr-2021 21:52:15 GMT; path=/; + - fpc=AjtOMWM1Vv1OkUPoeUBKmNQ; expires=Sat, 03-Jul-2021 21:31:28 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBnlIOVH5WTOOMZ5bxcHP00H8B48fD3cgl6wOy-HhJGX2k8THn3sj0I3F5b5NQsmhPtG0SE0H-262arCt_mHJTtLd8AvE6Bwy5K6SV5vB77SMNocztNFTV8ZhiHVbgnQxZbi8C7vPwiuQLh57U2dJSvYBsAWxNbKtyUBwCdCfMRwgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrdldMghJxL41eghT8DLFed4uxk36kzDv2_Rmh6g9IQE6KFTUvwqeH-AMSQxFaULdfVndyhC_YKroM4WCHwIhfx0zbBdp7XDwNRMBcOb6WVjOLKg3IDfPyguy7Qu8tM9vSA9xqZQmeW2ZEC7TmrIpCy9ZlJchreYL5OA4MKTyUgUIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -3269,7 +2739,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices + - 2.1.11787.14 - SCUS ProdSlices status: code: 200 message: OK @@ -3287,41 +2757,39 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1709' + - '1780' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:16 GMT + - Thu, 03 Jun 2021 21:31:28 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 0692B83F4B0D49EAA2794812F21F6849 Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:31:28Z' status: code: 200 message: OK - request: body: '{"location": "centralus", "tags": {}, "sku": {"name": "av20"}, "properties": - {"managementCluster": {"clusterSize": 3}, "internet": "Enabled", "identitySources": + {"managementCluster": {"clusterSize": 4}, "internet": "Enabled", "identitySources": [], "circuit": {}, "networkBlock": "192.168.48.0/22"}}' headers: Accept: @@ -3339,35 +2807,37 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[{"alias":"groupAlias","baseGroupDN":"ou=baseGroup","baseUserDN":"ou=baseUser","domain":"domain","name":"groupName","primaryServer":"ldaps://1.1.1.1:636/","ssl":"Disabled"}],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Updating","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f?api-version=2021-06-01 cache-control: - no-cache content-length: - - '1708' + - '1779' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:16 GMT + - Thu, 03 Jun 2021 21:31:28 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' + x-msedge-ref: + - 'Ref A: 1837C0679B4A4E1C91B8C7176B6C5815 Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:31:29Z' status: code: 201 message: Created @@ -3385,12 +2855,12 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4","name":"1faf9e7b-aeaa-4e50-875f-853f28d311f4","percentComplete":10,"startTime":"2021-03-30T21:52:13.4251577+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f","name":"e10c7aab-c4a3-435c-8ccf-a431a43b701f","percentComplete":10,"startTime":"2021-06-03T21:31:07.6446736+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3399,21 +2869,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:26 GMT + - Thu, 03 Jun 2021 21:31:39 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: A1191AD91CA444BE9AB6EAB33E1E879B Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:31:39Z' status: code: 200 message: OK @@ -3431,12 +2899,12 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4","name":"1faf9e7b-aeaa-4e50-875f-853f28d311f4","percentComplete":100,"startTime":"2021-03-30T21:52:13.4251577+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f","name":"e10c7aab-c4a3-435c-8ccf-a431a43b701f","percentComplete":100,"startTime":"2021-06-03T21:31:07.6446736+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3445,21 +2913,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:38 GMT + - Thu, 03 Jun 2021 21:31:49 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 9A287D863D604E26ADDDE4F92BE49286 Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:31:49Z' status: code: 200 message: OK @@ -3477,35 +2943,33 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:52:13.4251577+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/1faf9e7b-aeaa-4e50-875f-853f28d311f4","name":"1faf9e7b-aeaa-4e50-875f-853f28d311f4","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-03-30T21:52:13.4251577+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:31:07.6446736+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/e10c7aab-c4a3-435c-8ccf-a431a43b701f","name":"e10c7aab-c4a3-435c-8ccf-a431a43b701f","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-03T21:31:07.6446736+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '1986' + - '2057' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:48 GMT + - Thu, 03 Jun 2021 21:31:59 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: A3DFA49199AC4181866A1741A9C19182 Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:32:00Z' status: code: 200 message: OK @@ -3523,35 +2987,33 @@ interactions: ParameterSetName: - -g -c -n --alias --domain User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost17.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"centralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt19-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt19-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost17.mp01.mock01.vmcp.vs.management","gp-fakehost19.mp01.mock01.vmcp.vs.management","gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost34.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1538' + - '1609' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:48 GMT + - Thu, 03 Jun 2021 21:31:59 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 1E15F604DF9B4DE5A69F9823CF6B4A6C Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:32:00Z' status: code: 200 message: OK @@ -3595,13 +3057,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:49 GMT + - Thu, 03 Jun 2021 21:32:01 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Ar-o7BxbACxCmTAJLB5LEJw; expires=Thu, 29-Apr-2021 21:52:50 GMT; path=/; + - fpc=Apetflg2vEhGjlBGK3ViI8s; expires=Sat, 03-Jul-2021 21:32:01 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMJDm8QWGpL4cYF7TYVQ_p9z9Sr0Pdu_PAxU2Kg4nX70g3KEtRtAu1179O5H6Ac_9Z8ZvirAwBDs1WVI6Yy33xsaVj2hxrQB5tbvgeCoOEJ9hqKm2NFaGa0V_QMjMLzKRJNbeXNi_0eXq0fNb7fZPHd0pXi9yu1zzd0OEsClCFaEgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrEstpQ1SVvCD2gaDknX0-enzCkOQKrvoxdxdnhwRbkB2t0JKvVKoD4MXQidjAiPwrvEaMAsdPLCBiuqBLk33wVxlSo38kv75Cz6jAiHzTBfwhwp6UqqL2k3d9ye2o3HOX2ky-1-fdpGL_41g-bZkNuH3eo62JrqPHbeWQxkYHTPogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -3610,7 +3072,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices + - 2.1.11787.14 - EUS ProdSlices status: code: 200 message: OK @@ -3628,9 +3090,9 @@ interactions: ParameterSetName: - -g -c User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters?api-version=2021-06-01 response: body: string: '{"value":[]}' @@ -3642,21 +3104,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:50 GMT + - Thu, 03 Jun 2021 21:32:01 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 66100E60A9C94ABDB624F62ED62EC223 Ref B: PDX31EDGE0110 Ref C: 2021-06-03T21:32:01Z' status: code: 200 message: OK @@ -3700,13 +3160,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:51 GMT + - Thu, 03 Jun 2021 21:32:01 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Aop1sODU-vpIuyjNc2E2HSY; expires=Thu, 29-Apr-2021 21:52:51 GMT; path=/; + - fpc=AlCus6Zp51FJoKcc9oqZu7Y; expires=Sat, 03-Jul-2021 21:32:02 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrvQ3fj_hkzjd3NqviFuCFkeT8J7F2t4gx_iNs-2xCojbUTchhsEUnewmVAWT_nbmpSiaHrlnJpUtRj42D-7xZl_VKjVRtaMCUl0_qEYLrWgHtETYLcXP81OGMBNMcVWUwqy3br6V-BhmmbSBVYfZvnfGfpnpTna7hMBZlREeGE9EgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrwr5u3NWnBLPqvgBy_W4tl0gOuy8tF4827Ib4pen-vyYysD_UG7cS994yq9WqIakZ9DRvyQpHtEztdkRAEUfVhpr9Jatwkg2sDxFvIPykyyF-RapGQsC46LFEcv2eNdy1dOp1BhMLTyYOHvGG3QZ90IUAhc0xnw2j3lxi-IEvcQMgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -3715,7 +3175,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - NCUS ProdSlices + - 2.1.11787.14 - SCUS ProdSlices status: code: 200 message: OK @@ -3737,15 +3197,15 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 cache-control: - no-cache content-length: @@ -3753,19 +3213,21 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:52:56 GMT + - Thu, 03 Jun 2021 21:32:07 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' + x-msedge-ref: + - 'Ref A: 114EC2C99E0F4721B3F91F34322087FD Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:02Z' status: code: 201 message: Created @@ -3783,12 +3245,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":0,"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994","name":"cca31ef1-5ef1-4cea-b2f3-c01ac8409994","percentComplete":0,"startTime":"2021-06-03T21:31:46.1403942+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3797,21 +3259,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:07 GMT + - Thu, 03 Jun 2021 21:32:18 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 326561DAD735417BB26EAF510B768AF5 Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:18Z' status: code: 200 message: OK @@ -3829,12 +3289,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":50,"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994","name":"cca31ef1-5ef1-4cea-b2f3-c01ac8409994","percentComplete":50,"startTime":"2021-06-03T21:31:46.1403942+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3843,67 +3303,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - 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: - - vmware cluster create - Connection: - - keep-alive - ParameterSetName: - - -g -c -n --sku --size - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":0,"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Building"}' - headers: - cache-control: - - no-cache - content-length: - - '405' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:53:28 GMT + - Thu, 03 Jun 2021 21:32:28 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 7A0AC25D8C724BA0A42BA4D9258B8234 Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:28Z' status: code: 200 message: OK @@ -3921,12 +3333,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":75,"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994","name":"cca31ef1-5ef1-4cea-b2f3-c01ac8409994","percentComplete":75,"startTime":"2021-06-03T21:31:46.1403942+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3935,21 +3347,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:38 GMT + - Thu, 03 Jun 2021 21:32:38 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: D8BAB3279BF14486AC5C6A1BA9421E92 Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:38Z' status: code: 200 message: OK @@ -3967,12 +3377,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":75,"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994","name":"cca31ef1-5ef1-4cea-b2f3-c01ac8409994","percentComplete":75,"startTime":"2021-06-03T21:31:46.1403942+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -3981,21 +3391,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:48 GMT + - Thu, 03 Jun 2021 21:32:48 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: A5CC1DA2E32C4543B938366B6AC3540E Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:49Z' status: code: 200 message: OK @@ -4013,12 +3421,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:53:44.7518958+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/758e8275-14ad-41e0-a1fb-e5fd60879b2b","name":"758e8275-14ad-41e0-a1fb-e5fd60879b2b","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"},"startTime":"2021-03-30T21:52:53.3162776+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:32:49.4811551+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cca31ef1-5ef1-4cea-b2f3-c01ac8409994","name":"cca31ef1-5ef1-4cea-b2f3-c01ac8409994","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"},"startTime":"2021-06-03T21:31:46.1403942+00:00","status":"Succeeded"}' headers: cache-control: - no-cache @@ -4027,21 +3435,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:59 GMT + - Thu, 03 Jun 2021 21:32:59 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 944C7661020E4CB49EEEC70DEAB93F79 Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:59Z' status: code: 200 message: OK @@ -4059,12 +3465,12 @@ interactions: ParameterSetName: - -g -c -n --sku --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' headers: cache-control: - no-cache @@ -4073,21 +3479,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:53:59 GMT + - Thu, 03 Jun 2021 21:32:59 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: FEC7AB3A1F9B48EDB6C061CBAAB75667 Ref B: PDX31EDGE0121 Ref C: 2021-06-03T21:32:59Z' status: code: 200 message: OK @@ -4131,13 +3535,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:00 GMT + - Thu, 03 Jun 2021 21:33:00 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AimJqdLZJ45NkHxfy_LGF9c; expires=Thu, 29-Apr-2021 21:54:01 GMT; path=/; + - fpc=AkS7dHT645hJk4EevJF72bo; expires=Sat, 03-Jul-2021 21:33:00 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrCLldTU7IlhNDFN7RuiAvC6c9MQEHBkFm5tKbUCcTpV7PynsjFpxx-JmdpSt6qZo-M86_Mlgutyau9Bx1Ojswcg4S3HRlWi7WQMPr_K81e5wT8B277cthyuQJdFOIQJsv8cGC-Dgg4FrZZbiVVQyyLaYp1jH40tHGRn7ZcZjqvaYgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr77_GKSaz99IeQ9YDC36xNJIQCVyiPUz6j_M7IpR8TIgnHWgM2qPWZeSQsqPGjI-fRCJSNOqx3pBwxxYNZiUjSubIiDOaVyjJh3GB9EXkHsvjqmFMt7l8JwiOH2H2nQW6gbfjmQt7r5r_PticMVjHgq3rAOCAYeYJbhaDLoeWwpkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -4146,7 +3550,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.21 - NCUS ProdSlices status: code: 200 message: OK @@ -4164,12 +3568,12 @@ interactions: ParameterSetName: - -g -c User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters?api-version=2021-06-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":3,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}]}' headers: cache-control: - no-cache @@ -4178,21 +3582,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:02 GMT + - Thu, 03 Jun 2021 21:33:00 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 569945C26CDD47E79CC1A7048E2C4DE4 Ref B: PDX31EDGE0116 Ref C: 2021-06-03T21:33:00Z' status: code: 200 message: OK @@ -4236,13 +3638,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:02 GMT + - Thu, 03 Jun 2021 21:33:01 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AmWPcW7LzztLpudSBwoe_CI; expires=Thu, 29-Apr-2021 21:54:03 GMT; path=/; + - fpc=AiSADO4-FRlAsMAT1bUm2xc; expires=Sat, 03-Jul-2021 21:33:01 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0PcgztyMXcFn5qiJsefTW4VtFSe4OR3Y68Y2IKg2I6RyB1Jisos-Kv8stcr96hXzZnCR2qHIKblkGs12P9xhBHaS6acvdgr7-MtCJ7udYNPVoWfmAP8zDcYDFPMudZxVgBmYD6XmOS4GO8lYyHz7xz-VQILwoTkQhWfQwdyL8xMgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr1QkrTZy2J6f7zVQdYNyNVMziecspG_Kx8hzjblyy7YZiL7bs8uQWtydOJlHzsFfAh1G3Z8gLWJB-tDZK1pYHsEjpYbLnHgySU19WKZi1XOyD9hreow1NIYwWjpGskDdJ2Q6BK5197U8RXQayYvSzykMIHNkXajTvVajx4t-ugXsgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -4251,7 +3653,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - EUS ProdSlices + - 2.1.11722.21 - WUS2 ProdSlices status: code: 200 message: OK @@ -4273,15 +3675,15 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management","gp-fakehost42.mp01.mock01.vmcp.vs.management"],"provisioningState":"Updating"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management","gp-fakehost04.mp01.mock01.vmcp.vs.management"],"provisioningState":"Updating"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7?api-version=2021-06-01 cache-control: - no-cache content-length: @@ -4289,19 +3691,21 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:06 GMT + - Thu, 03 Jun 2021 21:33:02 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1196' + x-msedge-ref: + - 'Ref A: D302D2B24C6F4276A87F739352EB130A Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:01Z' status: code: 201 message: Created @@ -4319,81 +3723,33 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340","name":"cb3f24f2-df30-41b0-b9c7-138e926ad340","percentComplete":0,"startTime":"2021-03-30T21:54:02.8733969+00:00","status":"Building"}' - headers: - cache-control: - - no-cache - content-length: - - '405' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 30 Mar 2021 21:54:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - 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: - - vmware cluster update - Connection: - - keep-alive - ParameterSetName: - - -g -c -n --size - User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340","name":"cb3f24f2-df30-41b0-b9c7-138e926ad340","percentComplete":50,"startTime":"2021-03-30T21:54:02.8733969+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7","name":"27daa53f-9835-49bb-98aa-a109f9b2f9f7","percentComplete":0,"startTime":"2021-06-03T21:32:41.3365440+00:00","status":"Pending"}' headers: cache-control: - no-cache content-length: - - '406' + - '404' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:27 GMT + - Thu, 03 Jun 2021 21:33:12 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 894DF56468F54DFEBD81FE9662A87B51 Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:13Z' status: code: 200 message: OK @@ -4411,35 +3767,33 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340","name":"cb3f24f2-df30-41b0-b9c7-138e926ad340","percentComplete":0,"startTime":"2021-03-30T21:54:02.8733969+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7","name":"27daa53f-9835-49bb-98aa-a109f9b2f9f7","percentComplete":0,"startTime":"2021-06-03T21:32:41.3365440+00:00","status":"Pending"}' headers: cache-control: - no-cache content-length: - - '405' + - '404' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:38 GMT + - Thu, 03 Jun 2021 21:33:23 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 8D44A32778DD4BCF9A7C503C1F44E790 Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:23Z' status: code: 200 message: OK @@ -4457,35 +3811,33 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340","name":"cb3f24f2-df30-41b0-b9c7-138e926ad340","percentComplete":75,"startTime":"2021-03-30T21:54:02.8733969+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7","name":"27daa53f-9835-49bb-98aa-a109f9b2f9f7","percentComplete":0,"startTime":"2021-06-03T21:32:41.3365440+00:00","status":"Pending"}' headers: cache-control: - no-cache content-length: - - '406' + - '404' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:49 GMT + - Thu, 03 Jun 2021 21:33:33 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 20A96CF80861437691D6C825D9827D38 Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:34Z' status: code: 200 message: OK @@ -4503,35 +3855,33 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:54:44.7561278+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/cb3f24f2-df30-41b0-b9c7-138e926ad340","name":"cb3f24f2-df30-41b0-b9c7-138e926ad340","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management","gp-fakehost42.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"},"startTime":"2021-03-30T21:54:02.8733969+00:00","status":"Succeeded"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/27daa53f-9835-49bb-98aa-a109f9b2f9f7","name":"27daa53f-9835-49bb-98aa-a109f9b2f9f7","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management","gp-fakehost04.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"},"startTime":"2021-06-03T21:32:41.3365440+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '1047' + - '1001' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:59 GMT + - Thu, 03 Jun 2021 21:33:43 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 856A8B04C4534D1C881E69778E60C941 Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:44Z' status: code: 200 message: OK @@ -4549,12 +3899,12 @@ interactions: ParameterSetName: - -g -c -n --size User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management","gp-fakehost42.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management","gp-fakehost04.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' headers: cache-control: - no-cache @@ -4563,21 +3913,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:54:59 GMT + - Thu, 03 Jun 2021 21:33:43 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 99B1DCEA7D6640938C2C978A5AB8DD93 Ref B: PDX31EDGE0117 Ref C: 2021-06-03T21:33:44Z' status: code: 200 message: OK @@ -4621,13 +3969,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:00 GMT + - Thu, 03 Jun 2021 21:33:45 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AkprbcRtQwBCpYG7Eq4AsGU; expires=Thu, 29-Apr-2021 21:55:01 GMT; path=/; + - fpc=Aqd9KH0cr_1CnNlNnp4iMuE; expires=Sat, 03-Jul-2021 21:33:45 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevre3m8rMKtjgZUALa6T-v7LN6le__ZhFlZaIqI-FdzDxhMZ1uV7P3m5tUfZM_k3wcXsAbbsOJqSbz0--Q6G400woRsvJEkvTaLU7iqzhg21dlGlDh8re5EEJJft70VuvQQ4qJTwrtxsOLkO5PMDNc7_HPCLMpM4jhB7EmOOUlR1CIgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrYyhJoCmq29tCivhCXPta0oCP3rVJt2RP-K2mN1CcGFbnXh6PcEcfhwyuefvmO3sww6ZLAATEeh0e7v4qmZsg5j4qJNjgF9dXa6U0kqs1bTWSYQH62EzO0f0P8-pYZF8tXAeal7yQtRxbEVbU6hEegC47v8OhS6jMp88pEcFoUp0gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -4636,7 +3984,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11562.10 - WUS2 ProdSlices + - 2.1.11722.26 - WUS2 ProdSlices status: code: 200 message: OK @@ -4656,15 +4004,15 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost25.mp01.mock01.vmcp.vs.management","gp-fakehost42.mp01.mock01.vmcp.vs.management"],"provisioningState":"Deleting"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1","name":"pycluster1","properties":{"clusterId":2,"clusterSize":4,"hosts":["gp-fakehost36.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management","gp-fakehost04.mp01.mock01.vmcp.vs.management"],"provisioningState":"Deleting"},"sku":{"name":"av20"},"type":"Microsoft.AVS/privateClouds/clusters"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 cache-control: - no-cache content-length: @@ -4672,21 +4020,23 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:02 GMT + - Thu, 03 Jun 2021 21:33:46 GMT expires: - '-1' location: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationresults/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationresults/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14999' + x-msedge-ref: + - 'Ref A: F366BFA33B6B40D8AA9852126AA3A6E1 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:33:45Z' status: code: 202 message: Accepted @@ -4704,12 +4054,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":0,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":0,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -4718,21 +4068,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:13 GMT + - Thu, 03 Jun 2021 21:33:56 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: B676E46C924446B0BED0E7A8315E83C8 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:33:56Z' status: code: 200 message: OK @@ -4750,12 +4098,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":50,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":50,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -4764,21 +4112,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:23 GMT + - Thu, 03 Jun 2021 21:34:06 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 4FFD0E0D3B604DDE9AB2ABA928F1740C Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:34:07Z' status: code: 200 message: OK @@ -4796,12 +4142,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":50,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":50,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -4810,21 +4156,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:34 GMT + - Thu, 03 Jun 2021 21:34:16 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 4F2BE48EF1A9430598126F17FF2CA36B Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:34:17Z' status: code: 200 message: OK @@ -4842,12 +4186,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":75,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":75,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -4856,21 +4200,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:44 GMT + - Thu, 03 Jun 2021 21:34:26 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 6E68400F2F05470D93CB69FD1D6BC032 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:34:27Z' status: code: 200 message: OK @@ -4888,12 +4230,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":75,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":75,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -4902,21 +4244,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:55:54 GMT + - Thu, 03 Jun 2021 21:34:37 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 6D2C9B03F7AD4093AFBE21EE9FBF813D Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:34:37Z' status: code: 200 message: OK @@ -4934,12 +4274,12 @@ interactions: ParameterSetName: - -g -c -n User-Agent: - - AZURECLI/2.18.0 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-03-30T21:55:54.7814702+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/a2da9257-39d6-4748-9ba4-6471b9aa996d","name":"a2da9257-39d6-4748-9ba4-6471b9aa996d","percentComplete":100,"startTime":"2021-03-30T21:54:59.0873589+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T21:34:38.3993479+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1/clusters/pycluster1/operationstatuses/b08b75e9-4a1f-427d-8d6e-53d56e511186","name":"b08b75e9-4a1f-427d-8d6e-53d56e511186","percentComplete":100,"startTime":"2021-06-03T21:33:24.5517420+00:00","status":"Succeeded"}' headers: cache-control: - no-cache @@ -4948,21 +4288,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Mar 2021 21:56:05 GMT + - Thu, 03 Jun 2021 21:34:47 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: E299D00C2D16454F8E86228489216440 Ref B: PDX31EDGE0119 Ref C: 2021-06-03T21:34:48Z' status: code: 200 message: OK diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml new file mode 100644 index 00000000000..03337806818 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml @@ -0,0 +1,1805 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:14:55 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AlgsTiJUP3FIrRG1JcPVEMw; expires=Sun, 04-Jul-2021 01:14:55 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevroOhDcX_mPGRtljDDj4Q1klOhQMVEbcBZ9y7OzKwXqUIF7_bFwRKIdtOazpn_-QnFYhG_ZQzU4lH1B2TWhj3Hj1VidKUhamjDcb3sMdb8AGa7po1-pVR0yK559ciAQ87U_9pKNiTberfEjvg-2zUYPjKgeD8aMZMoW3LZzWHFAdggAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"location": "northcentralus", "tags": {}, "sku": {"name": "av20"}, "properties": + {"managementCluster": {"clusterSize": 4}, "internet": "Disabled", "networkBlock": + "192.168.48.0/22"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + Content-Length: + - '183' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/24","provisioningState":"Building","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '978' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: E68EC5C3FDB047D4851EDEE0B4C2C12F Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:14:55Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":0,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 3C9C78087AB4450AB94EA2AF141D7E31 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:12Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":0,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E8149F6885704EF1A6059802FA972DA3 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:22Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":88.75,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 1E35F494A033475ABBC44E4D06E27C96 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:32Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":88.75,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 7CB1EF3BBB6242BD84744AD93F32F01F Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:43Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:15:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 8443BC2B28004A9B972D37F1056652D8 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:53Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 56563E9676834382A7C124F7A9E6C27C Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:03Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: CE377FAB2F8E475391A3ADAF1B2605B8 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:13Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D45A7CD0E487479E81BFDC4A868EAF3C Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:23Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 39E7E3BD1F684223BDC2327C0B6BE7AB Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:34Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 61BE8D450CC84B6D874D67E301B4602D Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:44Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:16:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 8E7EE79974CD48D69F3F24C221E84547 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:54Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-04T01:16:59.2258667+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2069' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 21BFA2A2E7A449458A670AA6AD99DFE9 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:17:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1619' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 69D9634CE9004CDDB99625AC5789B76E Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:17:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:05 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AvJdidjTajVMpJI6tkbvCgo; expires=Sun, 04-Jul-2021 01:17:05 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr2HJdDjtvCUrc2CeixeTXUBlvXJa7xGTkRWj3QOC-vOovJC3V9rumQ0fEYRqDFnkm66LsbdmoSZ7AKI4NAjKSl2VBecA-FEcFIPF81X9KxnfKctgp-f1ofDu2TWqlxfQawS87iGb0-3BFgbEds96nGVgXWd6g5TEwcRiU5HBFW7EgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.26 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D13ED1D68C0540809F10B1649E335D27 Ref B: PDX31EDGE0119 Ref C: 2021-06-04T01:17:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:06 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AvKvRMVhyU1CmxNvwH7muzo; expires=Sun, 04-Jul-2021 01:17:06 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGimviEVQAG9CE5uWHnVUH1iSNMJyfPFGLD5aiR1SsWUJ2bwj12Yr0BXSuApQkfLRdhsHVerqBxK_ZWgerN5cO0xS4MfR6W49nL2fUliquL-4GcMNfgGFR5AXlDvfoP9Q1_GXzSC4Swl5VAdTANgVDVt3P8UGK71z28tsPNRJkkwgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11787.14 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"properties": {"addonType": "VR", "vrsCount": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Building","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '340' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + x-msedge-ref: + - 'Ref A: 6AFFE1DDE1DD4B97918375009ABF1AC6 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:06Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":25,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '398' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: B4DCFE37D3634558A7761EA03AD72052 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:17Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":0,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 78AC6270A30643A59315B7EE00F4ED32 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:28Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":50,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '398' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 3B88D8C9502445DD9C31DC7C8051A0DF Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:38Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":0,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 76FF3B630FB742619DEF746EC05674C4 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-04T01:17:44.0502741+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '801' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: FCD295CCABB24CF5947DC0FE831A34FC Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:58Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '341' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 2BC0AAE5923846DA91FEB7F7C8B968D1 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:58Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:58 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AoNokgBYlSVBtZKOL8n1xrY; expires=Sun, 04-Jul-2021 01:17:59 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrtO1NEQsZnsGnUjYGZw8kluGK-py-Y03C1b1-hgciN2AEVIvUgrDRcJnQB3mXiBlh1QkLBYH4IwsL84LQsknh-MjKLPceJC_JO0DBeHs0MjfoFOHzuP4zSzsSVDUFRoYcwE_8TMFZZMv8ZMqS_AGfG8l4oxZ-PZlNYC-7lMU01jIgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - EUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}]}' + headers: + cache-control: + - no-cache + content-length: + - '353' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:17:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 05BD151FA6764AA784FE3DCC8F8E1D3D Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:17:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:00 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AshtVrOo-1ZDjzlDEtDFg78; expires=Sun, 04-Jul-2021 01:18:00 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrXEESoVLh9tborC-5jO0qjlQmRHg0Id2nDz61j8LIfTsGbZ2bbWh2kUpX6qxyNVaeT5-tn3YFsdP1sIQVxWUwNE63mwkcZaUt1Cz5XMQWyT61uU9pvmeUVUlLl7QHcYNbjbrK5mF4VzJqgTwQbo8jbVXOtGNy5cf8AVGZfP2WOdUgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr show + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '341' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 262EFE2448474AFF86CF1CD2C54D6480 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:18:00Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:00 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AhTm7fQbUAdEuhVbK8xP1qs; expires=Sun, 04-Jul-2021 01:18:00 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrOiiFQPf4_nciCCIipWyZSUZsjIm0atKnhF23cvHRrK_NEHzHFwvl8VcnvFlrV7ev4T0hWRQjiBhzGuR3a_7iB-yJY_Wucc2c-oEjaaX3uQu4EydAcOgj7VgN6ii5IanLi3QxsVLGqMjhob9Z5frRImc6g8hePviNGqTqfGx3InYgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.26 - EUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Deleting","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '340' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:00 GMT + expires: + - '-1' + location: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationresults/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14997' + x-msedge-ref: + - 'Ref A: CD5B5BFA6D4D444DB2D34BC3C02F1B2F Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:00Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: BC592D98F6C240B68C12F83D5DD1EEFB Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:11Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 32387C5DA5874D67A93A1560C208C400 Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:21Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":50,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '398' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A8F32D41E935423FB28F701155BED24E Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:31Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 96815CAAF5134036B032510D806728BD Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:41Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-04T01:18:39.0494200+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":100,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '446' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D52AC86943324364834495C971CCCC37 Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:52Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:52 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Aonec9VPQYFMiOT1xefOtek; expires=Sun, 04-Jul-2021 01:18:52 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrJ5x1-VgS2KVYhm90pYVRX-JClvzgjcDE0RlN9_t5XwlrZIWYTXo9hE7fP5V3l4n6NkFkDky2K615sdL4QSlz18p5gOWkgRpB3UXmqOjC4DkuEWw8AVIkWPjKEq4klQWHKP862Fep7c17QQxxcm5awRSWsuFN9ee9jE1NiSnz6XogAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.26 - EUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 01:18:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E42B1FCEA4FA4BDEB76E1571C3D351F0 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:18:53Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_datastores.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_datastores.yaml index fd00341f8de..0a1068ab48d 100644 --- a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_datastores.yaml +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_datastores.yaml @@ -1,190 +1,304 @@ interactions: - request: body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 03 Jun 2021 20:37:12 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Aj8f589qiTxOlJkgGY96Fuk; expires=Sat, 03-Jul-2021 20:37:13 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr9rbqiTYy_YgPA7uXITa-dCH8nwbQ2aezA6m87zoKX0OqjeX_vgRRbRdLlqG5NTGGRaJovA0mbXmoLkLrEWxszgE0gLV0WVZz046f46Y-_smUbp6vfkpbxQxPX0PggSi16VmLEbD4Z_VBY0XilG4NSH-w5XFN1Xlid3u30PzL7FIgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"properties": {"diskPoolVolume": {"targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target", + "lunName": "lun0", "mountOption": "MOUNT"}}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - vmware datastore show + - vmware datastore disk-pool-volume create Connection: - keep-alive + Content-Length: + - '271' + Content-Type: + - application/json ParameterSetName: - - --name --resource-group --cluster --private-cloud + - --name --resource-group --private-cloud --cluster --target-id --lun-name User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/rasivagu-iscsi-datastore?api-version=2021-01-01-preview + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/rasivagu-iscsi-datastore","name":"rasivagu-iscsi-datastore","properties":{"diskPoolVolume":{"endpoints":["10.45.0.4:3260"],"lunName":"lun0"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Pending"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/423677d7-f078-42fd-9e7e-321a0d73b2be?api-version=2021-06-01 cache-control: - no-cache content-length: - - '408' + - '570' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:26 GMT + - Thu, 03 Jun 2021 20:37:16 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: AA01EC02673C4690A104744662D707B8 Ref B: WSTEDGE1110 Ref C: 2021-06-03T20:37:13Z' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - vmware datastore list + - vmware datastore disk-pool-volume create Connection: - keep-alive ParameterSetName: - - --resource-group --cluster --private-cloud + - --name --resource-group --private-cloud --cluster --target-id --lun-name User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/423677d7-f078-42fd-9e7e-321a0d73b2be?api-version=2021-06-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1","name":"ANFDatastore1","properties":{"netAppVolume":{"nfsFilePath":"ANFVol1FilePath","nfsProviderIp":"10.50.1.4"},"provisioningState":"Deleting"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/functional-test","name":"functional-test","properties":{"diskPoolVolume":{"endpoints":["10.45.0.4:3260"],"lunName":"lun1"},"provisioningState":"Deleting"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/rasivagu-iscsi-datastore","name":"rasivagu-iscsi-datastore","properties":{"diskPoolVolume":{"endpoints":["10.45.0.4:3260"],"lunName":"lun0"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/rasivagu-iscsi-datastore-1","name":"rasivagu-iscsi-datastore-1","properties":{"diskPoolVolume":{"endpoints":["10.45.0.4"],"lunName":"lun1"},"provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/rasivagu-iscsi-datastore-copy","name":"rasivagu-iscsi-datastore-copy","properties":{"diskPoolVolume":{"endpoints":["10.45.0.4:3260"],"lunName":"lun1"},"provisioningState":"Deleting"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}]}' + string: '{"endTime":"2021-06-03T20:37:16.6433365+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/423677d7-f078-42fd-9e7e-321a0d73b2be","name":"423677d7-f078-42fd-9e7e-321a0d73b2be","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},"startTime":"2021-06-03T20:37:15.2647827+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '2031' + - '1019' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:27 GMT + - Thu, 03 Jun 2021 20:37:26 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: D1C2BA89AE78494DB5CBD42B6088A31E Ref B: WSTEDGE1110 Ref C: 2021-06-03T20:37:26Z' status: code: 200 message: OK - request: - body: '{"properties": {"netAppVolume": {"nfsProviderIp": "10.50.1.4", "nfsFilePath": - "ANFVol1FilePath"}}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - vmware datastore create + - vmware datastore disk-pool-volume create Connection: - keep-alive - Content-Length: - - '98' - Content-Type: - - application/json ParameterSetName: - - --name --resource-group --cluster --private-cloud --nfs-file-path --nfs-provider-ip + - --name --resource-group --private-cloud --cluster --target-id --lun-name User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1?api-version=2021-01-01-preview + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1","name":"ANFDatastore1","properties":{"netAppVolume":{"nfsFilePath":"ANFVol1FilePath","nfsProviderIp":"10.50.1.4"},"provisioningState":"Pending"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' headers: - azure-asyncoperation: - - https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/a54926ad-f0c2-4372-a7a1-6eb68ec90208?api-version=2021-01-01-preview cache-control: - no-cache content-length: - - '394' + - '572' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:30 GMT + - Thu, 03 Jun 2021 20:37:26 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-msedge-ref: + - 'Ref A: C8A051D94412485EADACEADAADD063FD Ref B: WSTEDGE1110 Ref C: 2021-06-03T20:37:26Z' status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: Accept: - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 03 Jun 2021 20:37:27 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Arbzb2bM-L9Ftzsn1wLrU5k; expires=Sat, 03-Jul-2021 20:37:28 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrqdEzbk--0ngETuxmF7QdAWgb_PQEH4rX7_Rym0pYjW4q_jb_erIrZ3fRGA9WwbRuRZBY7S_8BMpqjBFn4FDJqHjXmOFhy3za3gilUPp40ihtBKNLghv7oA1mWbBDivhOHyznQhOw9_Jrw3TzdNmEDM8LpIi_twHxLVVTrS9UEzMgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate CommandName: - - vmware datastore create + - vmware datastore show Connection: - keep-alive ParameterSetName: - - --name --resource-group --cluster --private-cloud --nfs-file-path --nfs-provider-ip + - --name --resource-group --private-cloud --cluster User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/a54926ad-f0c2-4372-a7a1-6eb68ec90208?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-02-15T13:09:32.3362991+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/a54926ad-f0c2-4372-a7a1-6eb68ec90208","name":"a54926ad-f0c2-4372-a7a1-6eb68ec90208","percentComplete":100,"startTime":"2021-02-15T13:09:29.6193991+00:00","status":"Succeeded"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' headers: cache-control: - no-cache content-length: - - '430' + - '572' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:40 GMT + - Thu, 03 Jun 2021 20:37:27 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: DFCC24212B144714BBB139A61191967D Ref B: WSTEDGE1005 Ref C: 2021-06-03T20:37:28Z' status: code: 200 message: OK @@ -193,44 +307,57 @@ interactions: headers: Accept: - '*/*' + Accept-Charset: + - utf-8 Accept-Encoding: - gzip, deflate - CommandName: - - vmware datastore create Connection: - keep-alive - ParameterSetName: - - --name --resource-group --cluster --private-cloud --nfs-file-path --nfs-provider-ip User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1?api-version=2021-01-01-preview + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1","name":"ANFDatastore1","properties":{"netAppVolume":{"nfsFilePath":"ANFVol1FilePath","nfsProviderIp":"10.50.1.4"},"provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' cache-control: - - no-cache + - max-age=86400, private content-length: - - '395' + - '131' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx + - Thu, 03 Jun 2021 20:37:28 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=ApQMTB7OmGxElejTI_nD-KI; expires=Sat, 03-Jul-2021 20:37:28 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrCttPgZbi6xCTUiOW-UwhtVE0J3ix7gmB6B6plUlVxibgnyYFi2YOH5hXKlH7u3mz2JFKBJOwjbK_lmN-gvWU9Gx7JEuwlB5yBE3_Xodqe6uY7xrsxJonQHAHGAHNeFw1FC-Q5yfGYVIUKEHM_CBoZvgiGvT-qKnwBm3qNyiaM6ogAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices status: code: 200 message: OK @@ -242,41 +369,98 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - vmware datastore show + - vmware datastore list Connection: - keep-alive ParameterSetName: - - --name --resource-group --cluster --private-cloud + - --resource-group --private-cloud --cluster User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1","name":"ANFDatastore1","properties":{"netAppVolume":{"nfsFilePath":"ANFVol1FilePath","nfsProviderIp":"10.50.1.4"},"provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/df-iscsi-datastore-1","name":"df-iscsi-datastore-1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/df-iscsi-datastore-2","name":"df-iscsi-datastore-2","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/df-iscsi-datastore-3","name":"df-iscsi-datastore-3","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/df-iscsi-datastore-4","name":"df-iscsi-datastore-4","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}]}' headers: cache-control: - no-cache content-length: - - '395' + - '2916' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:42 GMT + - Thu, 03 Jun 2021 20:37:29 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 79E2159D4A5C48E681027A444D877178 Ref B: WSTEDGE1017 Ref C: 2021-06-03T20:37:29Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 03 Jun 2021 20:37:30 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AriST5J3hzRAmiqgDxWKxdw; expires=Sat, 03-Jul-2021 20:37:30 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrnxGW_OEXcfY54JU6624WEQiDYZBKAZ6_P6Y_Qreb0h4gl2J1NObsS9UC1XqhN-Uyg5lU0Mk3xxumnpiMoIwHqsxNBr0NM1qkNAN7faHj5tg91CsiWyF3vwC_34u_1PGExigwyJ6cRmCSY7bOMdhvJXWnBf2U24F_wcYLtFHVof8gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-ests-server: + - 2.1.11722.26 - WUS2 ProdSlices status: code: 200 message: OK @@ -294,39 +478,41 @@ interactions: Content-Length: - '0' ParameterSetName: - - --name --resource-group --cluster --private-cloud + - --name --resource-group --private-cloud --cluster User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1","name":"ANFDatastore1","properties":{"netAppVolume":{"nfsFilePath":"ANFVol1FilePath","nfsProviderIp":"10.50.1.4"},"provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1","name":"iSCSIDatastore1","properties":{"diskPoolVolume":{"lunName":"lun0","mountOption":"Mount","targetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target"},"provisioningState":"Pending"},"type":"Microsoft.AVS/privateClouds/clusters/datastores"}' headers: azure-asyncoperation: - - https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/77db29fd-fe41-4188-8728-345b993ced83?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/71b73745-5644-4172-8cfd-305fb265d3c3?api-version=2021-06-01 cache-control: - no-cache content-length: - - '395' + - '570' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:43 GMT + - Thu, 03 Jun 2021 20:37:31 GMT expires: - '-1' location: - - https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationresults/77db29fd-fe41-4188-8728-345b993ced83?api-version=2021-01-01-preview + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationresults/71b73745-5644-4172-8cfd-305fb265d3c3?api-version=2021-06-01 pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - '14999' + x-msedge-ref: + - 'Ref A: 506FAE2517144950846A0CE04475665E Ref B: WSTEDGE1015 Ref C: 2021-06-03T20:37:30Z' status: code: 202 message: Accepted @@ -342,37 +528,35 @@ interactions: Connection: - keep-alive ParameterSetName: - - --name --resource-group --cluster --private-cloud + - --name --resource-group --private-cloud --cluster User-Agent: - - AZURECLI/2.19.1 azsdk-python-avsclient/unknown Python/3.8.7 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.19.1 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://eastus2euap.management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/77db29fd-fe41-4188-8728-345b993ced83?api-version=2021-01-01-preview + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/71b73745-5644-4172-8cfd-305fb265d3c3?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-02-15T13:09:49.6616633+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-cloudsan-rg/providers/Microsoft.AVS/privateClouds/rasivagu-sddc/clusters/Cluster-1/datastores/ANFDatastore1/operationstatuses/77db29fd-fe41-4188-8728-345b993ced83","name":"77db29fd-fe41-4188-8728-345b993ced83","percentComplete":100,"startTime":"2021-02-15T13:09:43.4189481+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-03T20:37:30.7641057+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rasivagu-sddc-rg/providers/Microsoft.AVS/privateClouds/rasivagu-mock-sddc/clusters/Cluster-1/datastores/iSCSIDatastore1/operationstatuses/71b73745-5644-4172-8cfd-305fb265d3c3","name":"71b73745-5644-4172-8cfd-305fb265d3c3","percentComplete":100,"startTime":"2021-06-03T20:37:30.2163126+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '430' + - '433' content-type: - application/json; charset=utf-8 date: - - Mon, 15 Feb 2021 13:09:53 GMT + - Thu, 03 Jun 2021 20:37:41 GMT expires: - '-1' pragma: - no-cache - server: - - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff + x-msedge-ref: + - 'Ref A: 2A4A67D2A0974537AF413865BC47527D Ref B: WSTEDGE1015 Ref C: 2021-06-03T20:37:41Z' status: code: 200 message: OK diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_hcx.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_hcx.yaml new file mode 100644 index 00000000000..92294a09967 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_hcx.yaml @@ -0,0 +1,1812 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:47:25 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Av89MEb4STpCrAwDkrweVHI; expires=Sun, 04-Jul-2021 20:47:26 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrpykcMjdTlSALJN7grLCyywaReickhAU1aDPAhiOqtHxzuTfBeOTDL1sLKBLJwM9YNzvhFwJRnCk0O-vuWFydXOgYZo8s5pjIJKDCqLZxl87RxkUXK2HLcE-POsV-H0CFtgJr9gwTx0HunBGTU-eRXZ98vYCSknVXjwng0_ZvMyIgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "sku": {"name": "av20"}, "properties": + {"managementCluster": {"clusterSize": 4}, "internet": "Disabled", "networkBlock": + "192.168.48.0/22", "vcenterPassword": "UpfBXae9ZquZSDXk(", "nsxtPassword": "5rqdLj4GF3cePUe6("}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + Content-Length: + - '259' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost26.mp01.mock01.vmcp.vs.management","gp-fakehost23.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/25","provisioningState":"Building","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '975' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:47:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-msedge-ref: + - 'Ref A: F65592E081E84BBABACD849AE30059E9 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:47:28Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":0,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '385' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:47:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 50479F585605401EA6C381F2A1C74FDC Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:47:45Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":0,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '385' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:47:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: DBF9EDFC2D38420F91926977935481A8 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:47:55Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":88.75,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: F7CE87EE5B184BADBD8EEC74512D1692 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":88.75,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D62C34FDFB3C4EE2AF0DAA822FC7EFE5 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:15Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: F5912C70FB214AA5BFF35779B9F83B2D Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:26Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 30BF35C47A534657883BFF79DCFA96DB Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:36Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 7EB6A35CA25C4EEBBBAE53230C6886EC Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:46Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:48:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: F5E70D4E76B84E94A53BF91C2B9BBB52 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:48:56Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 8B22556FAF3941DD85129FC022D3956F Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:07Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 7EEF89A78A9F40968E42957C1C2D266F Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:17Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E1DD2DC54B454DEEB9750D76E7C6059F Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:27Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 32C206FABEC641F2970FB35689C88C84 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:37Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-04T20:49:38.7927014+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/8799968a-d37f-4faf-a862-205936e3f76c","name":"8799968a-d37f-4faf-a862-205936e3f76c","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt93-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt93-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt93-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt93-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost26.mp01.mock01.vmcp.vs.management","gp-fakehost23.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-04T20:47:28.4741907+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2067' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 481BABE1BDE242FE9F87AE0262CA46A5 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt93-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt93-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt93-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt93-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost24.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost26.mp01.mock01.vmcp.vs.management","gp-fakehost23.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1619' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 6C3239151D31471080BCA1D9F4A77256 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T20:49:49Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:51 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AljdlyTyfspKnN_wMpTYKLg; expires=Sun, 04-Jul-2021 20:49:52 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrR51bU104JoVGEx4NZCFUx92HGTjJ7L_rIzSCP3ZcnbwnEOzgwyzLGUOW-XwXJEn_zqeLNY5pZPTObRI2CnZNYbzXlwjflYRb4Sk0jQ2Ul_lZLGBRyQF4jxgWIjkOgekFkmPnb8k0PTN3roSAeOAIe7MW_hW6NY2kqonkeEhc_JQgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"properties": {"addonType": "HCX", "offer": "VMware MaaS Cloud Provider"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx","name":"hcx","properties":{"addonType":"HCX","offer":"VMware + MaaS Cloud Provider","provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:49:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 2FFE7DDABDA143E9A32D846A8F4E7797 Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:49:54Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16","name":"9f44e222-0450-4a61-94e8-7d3deafb7d16","percentComplete":25,"startTime":"2021-06-04T20:49:51.5280087+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A6DEFCC2809847FCA1AE160EA8EB220B Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:07Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16","name":"9f44e222-0450-4a61-94e8-7d3deafb7d16","percentComplete":0,"startTime":"2021-06-04T20:49:51.5280087+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '396' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 342CCD8E3A1D487284793F5A802610BD Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:17Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16","name":"9f44e222-0450-4a61-94e8-7d3deafb7d16","percentComplete":50,"startTime":"2021-06-04T20:49:51.5280087+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '397' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 12BB443BC56149CEB5C8B4E173178DBC Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:28Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-04T20:50:23.6911030+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx/operationstatuses/9f44e222-0450-4a61-94e8-7d3deafb7d16","name":"9f44e222-0450-4a61-94e8-7d3deafb7d16","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx","name":"hcx","properties":{"addonType":"HCX","offer":"VMware + MaaS Cloud Provider","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2021-06-04T20:49:51.5280087+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '825' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 047096156FCE4AA38C25E2647D994349 Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:38Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon hcx create + Connection: + - keep-alive + ParameterSetName: + - -g -c --offer + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx","name":"hcx","properties":{"addonType":"HCX","offer":"VMware + MaaS Cloud Provider","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: FFDAFF65CF534F1392A274B3AC46A864 Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:38Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:40 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AilGX3jytwxNv0HFya5UWAg; expires=Sun, 04-Jul-2021 20:50:41 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0xeWN09IaRY74CrEKI6Z0FpEGOtwuGx9wgmDZS6wMV6EQ1gEcV5Qdi-fnsGA6xgYPmAJk3f3FY30-CeQgAr2XGs1fYIPDck6VF_wEWGzy1YoIycGhU4pMiyMj6VrBQTd5zPcbjeE6JU_4TIiGP6rsEJ4gF5H-r-q0YPZcGMSGc4gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx","name":"hcx","properties":{"addonType":"HCX","offer":"VMware + MaaS Cloud Provider","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"}]}' + headers: + cache-control: + - no-cache + content-length: + - '378' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E2EB7866377B43AA9D9680A2BD186960 Ref B: PDX31EDGE0108 Ref C: 2021-06-04T20:50:43Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:46 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AmWN7sC5pgJJlQZ_KUVjxT0; expires=Sun, 04-Jul-2021 20:50:46 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrmNUFBX-aJ4-HBCKSxDlMQWNiS2D2PbpuN8g8G8JN-JPO2e2nqkjcm61M-PdxL09IyOi0k5ekJhfdJ0HU0lu57JkBKPiWjg8usJKmUTxaH7BybIZBJ2RGeDETXSCBKi-GQvqAKiJ08Nqt-Mwmn5Fhh9fa4Uz1j8nGrTENiRlnJQYgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 5134F2F683AB41B79C616D1185330F7D Ref B: PDX31EDGE0121 Ref C: 2021-06-04T20:50:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:51 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Av74CRYTc25Bk6hotr9ND_I; expires=Sun, 04-Jul-2021 20:50:51 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8tZEdo4066Ojo98k7mSxHXEbV1ev6IB02MiBgkQ7jXyqmO1QEXs7N48s9hGWTM7nVebQ2XZw-2BS-aoHwZRAQGTEGSRSE_UikUfHWdjLqzyGMPcJBuyVBcVMO6AIEPgUsFVYr4YdlQrS5cWFRdchKtcbcKyk2tG7YHrriU-nQdEgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site create + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"d85d1920606e47e899ad9886ded09317","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + x-msedge-ref: + - 'Ref A: 5EFA30EDE9314B9C88684A3DCA63E328 Ref B: PDX31EDGE0107 Ref C: 2021-06-04T20:50:54Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:56 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AuerVSNF0t1Cl-j3dWKQ19U; expires=Sun, 04-Jul-2021 20:50:57 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrWqvtDvi-EZqMIMFKFHBpH3DNRJhnGoAfZCnsdtS6JWAsr59OxJQNvBzmBjSGP9usg_gYBiDusyOwUPiA0W7p2ybZdfrDCPOPfDYH0Gocteohj_MgoBOQV3jm1-nefK4AN9LTbYoFMxzVWHs6GdIajRBs3Ihc6CUCIfXSmjg-5EwgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"d85d1920606e47e899ad9886ded09317","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}]}' + headers: + cache-control: + - no-cache + content-length: + - '391' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:50:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: B9535F7206B448F69EF0D924FAD0475D Ref B: PDX31EDGE0110 Ref C: 2021-06-04T20:50:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:51:02 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AvwAZLSU3eFJqD-LsoZCfpg; expires=Sun, 04-Jul-2021 20:51:02 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBDmLg2fAL3sRkIZzZlPtgRlmQ5mXar8-NBlg_qpX6TstZLO2vzX6yLzSYtEfCh58qNRVrUuYQIACt2LXs0eQMjlrQJshcmFxnzj7gCIVfMnsTbqjkngjnEayPoVSyE-rMvrr__WGCq_YTUM899uNAtCW-XAowThiUwxGTUlvYuwgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site show + Connection: + - keep-alive + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx","name":"myhcx","properties":{"activationKey":"d85d1920606e47e899ad9886ded09317","status":"Available"},"type":"Microsoft.AVS/privateClouds/hcxEnterpriseSites"}' + headers: + cache-control: + - no-cache + content-length: + - '379' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:51:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: DE12268D387F47EAB0B5554F8C013761 Ref B: PDX31EDGE0122 Ref C: 2021-06-04T20:51:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:51:07 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AsTIUS5RlkRFpbgFOUNG68I; expires=Sun, 04-Jul-2021 20:51:08 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrEPFIznp3NQJLimGUARENSdsdmY9bPwa6WDWdHc9gZWZCsIHWizv3DgcVcc1xtWB1DBvxb4U1rF72ETSOGzbpts-1gpWMooDaMdUKV3kB2v5lvlwGXJ1X1UqJvoCn3BtM5ABIFQr4420GtUXwz-m95eFQQS-uPJMFaUn4DgjnlDkgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11722.21 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/myhcx?api-version=2021-06-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/html + date: + - Fri, 04 Jun 2021 20:51:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + x-msedge-ref: + - 'Ref A: E53C14394A334675AA518649A6161B86 Ref B: PDX31EDGE0115 Ref C: 2021-06-04T20:51:10Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:51:13 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Aj8yZ8GrwmVDq9LXkoakPGA; expires=Sun, 04-Jul-2021 20:51:13 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevri_KslxqkfMpHbO4lwwtw2uL5XDtj4y_PkT4snJfk5jxQwCGqJQfeJPEOEihuWpFtfa-JD7sVrxb6po5vxRScKGzjXfHbt0_InpENxsKktFW-wO5r898BuntqZhilcIKIFOqFxCH651Zh8rMpg1NaV2Rcaz-OMAEbZw4Qmqhef6UgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11787.14 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware hcx-enterprise-site list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 04 Jun 2021 20:51:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: AF004BCE885E437CA041E26FE6A8FC2E Ref B: PDX31EDGE0114 Ref C: 2021-06-04T20:51:15Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py new file mode 100644 index 00000000000..3c98b5ce987 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) +from msrestazure.azure_exceptions import CloudError + + +class VmwareAddonScenarioTest(ScenarioTest): + def setUp(self): + # https://vcrpy.readthedocs.io/en/latest/configuration.html#request-matching + self.vcr.match_on = ['scheme', 'method', 'path', 'query'] # not 'host', 'port' + super(VmwareAddonScenarioTest, self).setUp() + + @ResourceGroupPreparer(name_prefix='cli_test_vmware_addon') + def test_vmware_addon(self): + self.kwargs.update({ + 'loc': 'northcentralus', + 'privatecloud': 'mycloud1' + }) + + # create a private cloud + self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --accept-eula') + + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'addon count expected to be 0') + + # Create a VR addon + self.cmd('az vmware addon vr create -g {rg} -c {privatecloud} --vrs-count 1') + + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 1, 'addon count expected to be 1') + + # Show a VR addon + self.cmd('az vmware addon vr show -g {rg} -c {privatecloud}') + + # Delete a VR addon + self.cmd('az vmware addon vr delete -g {rg} -c {privatecloud}') + + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'addon count expected to be 0') + + # # Create a SRM addon + # self.cmd('az vmware addon srm create -g {rg} -c {privatecloud} --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5"') + + # # List all existing addon + # count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + # self.assertEqual(count, 1, 'addon count expected to be 1') + + # # Show a SRM addon + # self.cmd('az vmware addon srm show -g {rg} -c {privatecloud}') + + # # Delete a SRM addon + # self.cmd('az vmware addon srm delete -g {rg} -c {privatecloud}') + + # # List all existing addon + # count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + # self.assertEqual(count, 0, 'addon count expected to be 0') diff --git a/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py b/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py index 4e9cbdc4496..528bd1cd3f0 100644 --- a/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py @@ -18,17 +18,33 @@ def setUp(self): @ResourceGroupPreparer(name_prefix='cli_test_vmware_datastores') def test_vmware_datastores(self): - # Get a pre-created iSCSI datastore - self.cmd('az vmware datastore show --name rasivagu-iscsi-datastore --resource-group rasivagu-cloudsan-rg --cluster Cluster-1 --private-cloud rasivagu-sddc') - - # List all existing datastores - self.cmd('az vmware datastore list --resource-group rasivagu-cloudsan-rg --cluster Cluster-1 --private-cloud rasivagu-sddc') + self.kwargs.update({ + # 'loc': 'centralus', + # 'privatecloud': 'cloud1', + # 'cluster': 'pycluster1', + 'rg': 'rasivagu-sddc-rg', + 'privatecloud': 'rasivagu-mock-sddc', + 'cluster': 'Cluster-1', + 'volume_id': '/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1', + 'target_id': '/subscriptions/ba75e79b-dd95-4025-9dbf-3a7ae8dff2b5/resourceGroups/rasivagu-df-rg/providers/Microsoft.StoragePool/diskPools/rasivagu-df-diskpool/iscsiTargets/rasivagu-df-target' + }) + + # Create a new iSCSI based datastore + self.cmd('az vmware datastore disk-pool-volume create --name iSCSIDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster} --target-id {target_id} --lun-name lun0') + # "The subscription '11111111-1111-1111-1111-111111111111' could not be found. + + # Get a iSCSI datastore + self.cmd('az vmware datastore show --name iSCSIDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster}') + + # # List all existing datastores + self.cmd('az vmware datastore list --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster}') # Create a new ANF based datastore - self.cmd('az vmware datastore create --name ANFDatastore1 --resource-group rasivagu-cloudsan-rg --cluster Cluster-1 --private-cloud rasivagu-sddc --nfs-file-path ANFVol1FilePath --nfs-provider-ip 10.50.1.4') + # self.cmd('az vmware datastore netapp-volume create --name ANFDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster} --volume-id {volume_id}') + # "ANF datastore is not enabled for the cloud SAN version 'v1' # Get the newly created ANF based datastore - self.cmd('az vmware datastore show --name ANFDatastore1 --resource-group rasivagu-cloudsan-rg --cluster Cluster-1 --private-cloud rasivagu-sddc') + # self.cmd('az vmware datastore show --name ANFDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster}') # Delete the newly created ANF based datastore - self.cmd('az vmware datastore delete --name ANFDatastore1 --resource-group rasivagu-cloudsan-rg --cluster Cluster-1 --private-cloud rasivagu-sddc') + self.cmd('az vmware datastore delete --name iSCSIDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster}') diff --git a/src/vmware/azext_vmware/tests/latest/test_hcx_scenario.py b/src/vmware/azext_vmware/tests/latest/test_hcx_scenario.py new file mode 100644 index 00000000000..576e33da42e --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/test_hcx_scenario.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) + + +class VmwareHcxScenarioTest(ScenarioTest): + def setUp(self): + # https://vcrpy.readthedocs.io/en/latest/configuration.html#request-matching + self.vcr.match_on = ['scheme', 'method', 'path', 'query'] # not 'host', 'port' + super(VmwareHcxScenarioTest, self).setUp() + + @ResourceGroupPreparer(name_prefix='cli_test_vmware_hcx') + def test_vmware_hcx(self): + self.kwargs.update({ + 'loc': 'westcentralus', + 'privatecloud': 'cloud1', + }) + + # create a private cloud + self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') + + # Create a HCX addon + self.cmd('az vmware addon hcx create -g {rg} -c {privatecloud} --offer "VMware MaaS Cloud Provider"') + + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 1, 'addon count expected to be 1') + + # hcx-enterprise-site list should report 0 + count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'hcx-enterprise-site count expected to be 0') + + # create authorization + self.cmd('vmware hcx-enterprise-site create -g {rg} -c {privatecloud} -n myhcx') + + # hcx-enterprise-site list should report 1 + count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 1, 'hcx-enterprise-site count expected to be 0') + + self.cmd('vmware hcx-enterprise-site show -g {rg} -c {privatecloud} -n myhcx') + + self.cmd('vmware hcx-enterprise-site delete -g {rg} -c {privatecloud} -n myhcx') + + # hcx-enterprise-site list should report 0 + count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'hcx-enterprise-site count expected to be 0') diff --git a/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py b/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py index f5aab316486..cd004b6fff5 100644 --- a/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py @@ -38,7 +38,7 @@ def test_vmware(self): self.assertEqual(count, 0, 'private cloud count expected to be 0') # create a private cloud - self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') + self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 3 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') count = len(self.cmd('vmware private-cloud list -g {rg}').get_output_in_json()) self.assertEqual(count, 1, 'private cloud count expected to be 1') @@ -56,28 +56,8 @@ def test_vmware(self): self.cmd('vmware private-cloud rotate-vcenter-password -g {rg} -c {privatecloud}') self.cmd('vmware private-cloud rotate-nsxt-password -g {rg} -c {privatecloud}') - # hcx-enterprise-site list should report 0 - count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) - self.assertEqual(count, 0, 'hcx-enterprise-site count expected to be 0') - - # create authorization - self.cmd('vmware hcx-enterprise-site create -g {rg} -c {privatecloud} -n myhcx') - - # hcx-enterprise-site list should report 1 - count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) - self.assertEqual(count, 1, 'hcx-enterprise-site count expected to be 0') - - self.cmd('vmware hcx-enterprise-site show -g {rg} -c {privatecloud} -n myhcx') - - self.cmd('vmware hcx-enterprise-site delete -g {rg} -c {privatecloud} -n myhcx') - - # bug 7470537 - # hcx-enterprise-site list should report 0 - # count = len(self.cmd('vmware hcx-enterprise-site list -g {rg} -c {privatecloud}').get_output_in_json()) - # self.assertEqual(count, 0, 'hcx-enterprise-site count expected to be 0') - # update private cloud to changed default cluster size - self.cmd('vmware private-cloud update -g {rg} -n {privatecloud} --cluster-size 3') + self.cmd('vmware private-cloud update -g {rg} -n {privatecloud} --cluster-size 4') # update private cloud to enable internet self.cmd('vmware private-cloud update -g {rg} -n {privatecloud} --internet enabled') diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py index 941c0090219..45ca0700235 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py @@ -1,10 +1,15 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._avs_client import AVSClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['AVSClient'] try: diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py index 03abbe8417d..8f5f84f3de4 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -14,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import AVSClientConfiguration from .operations import Operations @@ -25,7 +28,11 @@ from .operations import AuthorizationsOperations from .operations import GlobalReachConnectionsOperations from .operations import WorkloadNetworksOperations +from .operations import CloudLinksOperations from .operations import AddonsOperations +from .operations import ScriptPackagesOperations +from .operations import ScriptCmdletsOperations +from .operations import ScriptExecutionsOperations from . import models @@ -50,8 +57,16 @@ class AVSClient(object): :vartype global_reach_connections: avs_client.operations.GlobalReachConnectionsOperations :ivar workload_networks: WorkloadNetworksOperations operations :vartype workload_networks: avs_client.operations.WorkloadNetworksOperations + :ivar cloud_links: CloudLinksOperations operations + :vartype cloud_links: avs_client.operations.CloudLinksOperations :ivar addons: AddonsOperations operations :vartype addons: avs_client.operations.AddonsOperations + :ivar script_packages: ScriptPackagesOperations operations + :vartype script_packages: avs_client.operations.ScriptPackagesOperations + :ivar script_cmdlets: ScriptCmdletsOperations operations + :vartype script_cmdlets: avs_client.operations.ScriptCmdletsOperations + :ivar script_executions: ScriptExecutionsOperations operations + :vartype script_executions: avs_client.operations.ScriptExecutionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -96,8 +111,34 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.workload_networks = WorkloadNetworksOperations( self._client, self._config, self._serialize, self._deserialize) + self.cloud_links = CloudLinksOperations( + self._client, self._config, self._serialize, self._deserialize) self.addons = AddonsOperations( self._client, self._config, self._serialize, self._deserialize) + self.script_packages = ScriptPackagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.script_cmdlets = ScriptCmdletsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.script_executions = ScriptExecutionsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py index f7727e7138a..345b679841e 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -10,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class AVSClientConfiguration(Configuration): """Configuration for AVSClient. @@ -45,9 +48,9 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-01-preview" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'avsclient/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py index e678a22d524..7cbca6ac278 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py index 88ae3830005..b6a8d7e2bbb 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py @@ -1,11 +1,14 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -23,7 +26,11 @@ from .operations import AuthorizationsOperations from .operations import GlobalReachConnectionsOperations from .operations import WorkloadNetworksOperations +from .operations import CloudLinksOperations from .operations import AddonsOperations +from .operations import ScriptPackagesOperations +from .operations import ScriptCmdletsOperations +from .operations import ScriptExecutionsOperations from .. import models @@ -48,8 +55,16 @@ class AVSClient(object): :vartype global_reach_connections: avs_client.aio.operations.GlobalReachConnectionsOperations :ivar workload_networks: WorkloadNetworksOperations operations :vartype workload_networks: avs_client.aio.operations.WorkloadNetworksOperations + :ivar cloud_links: CloudLinksOperations operations + :vartype cloud_links: avs_client.aio.operations.CloudLinksOperations :ivar addons: AddonsOperations operations :vartype addons: avs_client.aio.operations.AddonsOperations + :ivar script_packages: ScriptPackagesOperations operations + :vartype script_packages: avs_client.aio.operations.ScriptPackagesOperations + :ivar script_cmdlets: ScriptCmdletsOperations operations + :vartype script_cmdlets: avs_client.aio.operations.ScriptCmdletsOperations + :ivar script_executions: ScriptExecutionsOperations operations + :vartype script_executions: avs_client.aio.operations.ScriptExecutionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -93,8 +108,33 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.workload_networks = WorkloadNetworksOperations( self._client, self._config, self._serialize, self._deserialize) + self.cloud_links = CloudLinksOperations( + self._client, self._config, self._serialize, self._deserialize) self.addons = AddonsOperations( self._client, self._config, self._serialize, self._deserialize) + self.script_packages = ScriptPackagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.script_cmdlets = ScriptCmdletsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.script_executions = ScriptExecutionsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py index 7357b103985..09d731cb67d 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -10,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class AVSClientConfiguration(Configuration): """Configuration for AVSClient. @@ -42,9 +45,9 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-01-preview" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'avsclient/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py index 15958be9f5c..1e3c208eb0f 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -13,7 +15,11 @@ from ._authorizations_operations import AuthorizationsOperations from ._global_reach_connections_operations import GlobalReachConnectionsOperations from ._workload_networks_operations import WorkloadNetworksOperations +from ._cloud_links_operations import CloudLinksOperations from ._addons_operations import AddonsOperations +from ._script_packages_operations import ScriptPackagesOperations +from ._script_cmdlets_operations import ScriptCmdletsOperations +from ._script_executions_operations import ScriptExecutionsOperations __all__ = [ 'Operations', @@ -25,5 +31,9 @@ 'AuthorizationsOperations', 'GlobalReachConnectionsOperations', 'WorkloadNetworksOperations', + 'CloudLinksOperations', 'AddonsOperations', + 'ScriptPackagesOperations', + 'ScriptCmdletsOperations', + 'ScriptExecutionsOperations', ] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py index db6d402eec1..9423e350061 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -45,7 +47,7 @@ def list( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AddonList"]: """List addons in a private cloud. @@ -65,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +124,7 @@ async def get( resource_group_name: str, private_cloud_name: str, addon_name: str, - **kwargs + **kwargs: Any ) -> "_models.Addon": """Get an addon by name in a private cloud. @@ -144,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,15 +188,17 @@ async def _create_or_update_initial( resource_group_name: str, private_cloud_name: str, addon_name: str, - addon: "_models.Addon", - **kwargs + properties: Optional["_models.AddonProperties"] = None, + **kwargs: Any ) -> "_models.Addon": cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _addon = _models.Addon(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +222,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(addon, 'Addon') + body_content = self._serialize.body(_addon, 'Addon') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -245,8 +249,8 @@ async def begin_create_or_update( resource_group_name: str, private_cloud_name: str, addon_name: str, - addon: "_models.Addon", - **kwargs + properties: Optional["_models.AddonProperties"] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.Addon"]: """Create or update a addon in a private cloud. @@ -258,12 +262,12 @@ async def begin_create_or_update( :type private_cloud_name: str :param addon_name: Name of the addon for the private cloud. :type addon_name: str - :param addon: A addon in the private cloud. - :type addon: ~avs_client.models.Addon + :param properties: The properties of an addon resource. + :type properties: ~avs_client.models.AddonProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Addon or the result of cls(response) @@ -282,7 +286,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, addon_name=addon_name, - addon=addon, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -323,14 +327,14 @@ async def _delete_initial( resource_group_name: str, private_cloud_name: str, addon_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -369,7 +373,7 @@ async def begin_delete( resource_group_name: str, private_cloud_name: str, addon_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a addon in a private cloud. @@ -383,8 +387,8 @@ async def begin_delete( :type addon_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py index c2e70890c25..33a79cc2af5 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -45,7 +47,7 @@ def list( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ExpressRouteAuthorizationList"]: """List ExpressRoute Circuit Authorizations in a private cloud. @@ -65,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +124,7 @@ async def get( resource_group_name: str, private_cloud_name: str, authorization_name: str, - **kwargs + **kwargs: Any ) -> "_models.ExpressRouteAuthorization": """Get an ExpressRoute Circuit Authorization by name in a private cloud. @@ -144,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,15 +188,16 @@ async def _create_or_update_initial( resource_group_name: str, private_cloud_name: str, authorization_name: str, - authorization: "_models.ExpressRouteAuthorization", - **kwargs + **kwargs: Any ) -> "_models.ExpressRouteAuthorization": cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _authorization = _models.ExpressRouteAuthorization() + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +221,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization, 'ExpressRouteAuthorization') + body_content = self._serialize.body(_authorization, 'ExpressRouteAuthorization') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -245,8 +248,7 @@ async def begin_create_or_update( resource_group_name: str, private_cloud_name: str, authorization_name: str, - authorization: "_models.ExpressRouteAuthorization", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ExpressRouteAuthorization"]: """Create or update an ExpressRoute Circuit Authorization in a private cloud. @@ -258,12 +260,10 @@ async def begin_create_or_update( :type private_cloud_name: str :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. :type authorization_name: str - :param authorization: An ExpressRoute Circuit Authorization. - :type authorization: ~avs_client.models.ExpressRouteAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteAuthorization or the result of cls(response) @@ -282,7 +282,6 @@ async def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, authorization_name=authorization_name, - authorization=authorization, cls=lambda x,y,z: x, **kwargs ) @@ -323,14 +322,14 @@ async def _delete_initial( resource_group_name: str, private_cloud_name: str, authorization_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -369,7 +368,7 @@ async def begin_delete( resource_group_name: str, private_cloud_name: str, authorization_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete an ExpressRoute Circuit Authorization in a private cloud. @@ -383,8 +382,8 @@ async def begin_delete( :type authorization_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py new file mode 100644 index 00000000000..4f0eeed8211 --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py @@ -0,0 +1,440 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CloudLinksOperations: + """CloudLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + private_cloud_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.CloudLinkList"]: + """List cloud link in a private cloud. + + List cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CloudLinkList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.CloudLinkList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLinkList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CloudLinkList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_cloud_name: str, + cloud_link_name: str, + **kwargs: Any + ) -> "_models.CloudLink": + """Get an cloud link by name in a private cloud. + + Get an cloud link by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CloudLink, or the result of cls(response) + :rtype: ~avs_client.models.CloudLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_cloud_name: str, + cloud_link_name: str, + linked_cloud: Optional[str] = None, + **kwargs: Any + ) -> "_models.CloudLink": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _cloud_link = _models.CloudLink(linked_cloud=linked_cloud) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_cloud_link, 'CloudLink') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CloudLink', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + private_cloud_name: str, + cloud_link_name: str, + linked_cloud: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.CloudLink"]: + """Create or update a cloud link in a private cloud. + + Create or update a cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: The name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :param linked_cloud: Identifier of the other private cloud participating in the link. + :type linked_cloud: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CloudLink or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.CloudLink] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cloud_link_name=cloud_link_name, + linked_cloud=linked_cloud, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + private_cloud_name: str, + cloud_link_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + private_cloud_name: str, + cloud_link_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a cloud link in a private cloud. + + Delete a cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cloud_link_name=cloud_link_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py index 7dfb026ffc4..36eb63d8af1 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -45,7 +47,7 @@ def list( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ClusterList"]: """List clusters in a private cloud. @@ -65,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +124,7 @@ async def get( resource_group_name: str, private_cloud_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> "_models.Cluster": """Get a cluster by name in a private cloud. @@ -144,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,15 +188,18 @@ async def _create_or_update_initial( resource_group_name: str, private_cloud_name: str, cluster_name: str, - cluster: "_models.Cluster", - **kwargs + sku: "_models.Sku", + cluster_size: Optional[int] = None, + **kwargs: Any ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _cluster = _models.Cluster(sku=sku, cluster_size=cluster_size) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +223,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster, 'Cluster') + body_content = self._serialize.body(_cluster, 'Cluster') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -245,8 +250,9 @@ async def begin_create_or_update( resource_group_name: str, private_cloud_name: str, cluster_name: str, - cluster: "_models.Cluster", - **kwargs + sku: "_models.Sku", + cluster_size: Optional[int] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.Cluster"]: """Create or update a cluster in a private cloud. @@ -258,12 +264,14 @@ async def begin_create_or_update( :type private_cloud_name: str :param cluster_name: Name of the cluster in the private cloud. :type cluster_name: str - :param cluster: A cluster in the private cloud. - :type cluster: ~avs_client.models.Cluster + :param sku: The cluster SKU. + :type sku: ~avs_client.models.Sku + :param cluster_size: The cluster size. + :type cluster_size: int :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) @@ -282,7 +290,8 @@ async def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, - cluster=cluster, + sku=sku, + cluster_size=cluster_size, cls=lambda x,y,z: x, **kwargs ) @@ -323,15 +332,17 @@ async def _update_initial( resource_group_name: str, private_cloud_name: str, cluster_name: str, - cluster_update: "_models.ClusterUpdate", - **kwargs + cluster_size: Optional[int] = None, + **kwargs: Any ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _cluster_update = _models.ClusterUpdate(cluster_size=cluster_size) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -355,7 +366,7 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster_update, 'ClusterUpdate') + body_content = self._serialize.body(_cluster_update, 'ClusterUpdate') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -382,8 +393,8 @@ async def begin_update( resource_group_name: str, private_cloud_name: str, cluster_name: str, - cluster_update: "_models.ClusterUpdate", - **kwargs + cluster_size: Optional[int] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.Cluster"]: """Update a cluster in a private cloud. @@ -395,12 +406,12 @@ async def begin_update( :type private_cloud_name: str :param cluster_name: Name of the cluster in the private cloud. :type cluster_name: str - :param cluster_update: The cluster properties to be updated. - :type cluster_update: ~avs_client.models.ClusterUpdate + :param cluster_size: The cluster size. + :type cluster_size: int :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) @@ -419,7 +430,7 @@ async def begin_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, - cluster_update=cluster_update, + cluster_size=cluster_size, cls=lambda x,y,z: x, **kwargs ) @@ -460,14 +471,14 @@ async def _delete_initial( resource_group_name: str, private_cloud_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -506,7 +517,7 @@ async def begin_delete( resource_group_name: str, private_cloud_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a cluster in a private cloud. @@ -520,8 +531,8 @@ async def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py index f8ec3e90a78..1d82843d079 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -46,11 +48,11 @@ def list( resource_group_name: str, private_cloud_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DatastoreList"]: - """List cloud datastores in a private cloud. + """List datastores in a private cloud cluster. - List cloud datastores in a private cloud. + List datastores in a private cloud cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -68,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +129,7 @@ async def get( private_cloud_name: str, cluster_name: str, datastore_name: str, - **kwargs + **kwargs: Any ) -> "_models.Datastore": """Get a datastore in a private cloud cluster. @@ -151,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -189,26 +191,29 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - async def _create_initial( + async def _create_or_update_initial( self, resource_group_name: str, private_cloud_name: str, cluster_name: str, datastore_name: str, - datastore: "_models.Datastore", - **kwargs + net_app_volume: Optional["_models.NetAppVolume"] = None, + disk_pool_volume: Optional["_models.DiskPoolVolume"] = None, + **kwargs: Any ) -> "_models.Datastore": cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _datastore = _models.Datastore(net_app_volume=net_app_volume, disk_pool_volume=disk_pool_volume) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -228,7 +233,7 @@ async def _create_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(datastore, 'Datastore') + body_content = self._serialize.body(_datastore, 'Datastore') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -248,20 +253,21 @@ async def _create_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - async def begin_create( + async def begin_create_or_update( self, resource_group_name: str, private_cloud_name: str, cluster_name: str, datastore_name: str, - datastore: "_models.Datastore", - **kwargs + net_app_volume: Optional["_models.NetAppVolume"] = None, + disk_pool_volume: Optional["_models.DiskPoolVolume"] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.Datastore"]: - """Create a datastore in a private cloud cluster. + """Create or update a datastore in a private cloud cluster. - Create a datastore in a private cloud cluster. + Create or update a datastore in a private cloud cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -271,12 +277,14 @@ async def begin_create( :type cluster_name: str :param datastore_name: Name of the datastore in the private cloud cluster. :type datastore_name: str - :param datastore: A datastore in a private cloud cluster. - :type datastore: ~avs_client.models.Datastore + :param net_app_volume: An Azure NetApp Files volume. + :type net_app_volume: ~avs_client.models.NetAppVolume + :param disk_pool_volume: An iSCSI volume. + :type disk_pool_volume: ~avs_client.models.DiskPoolVolume :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Datastore or the result of cls(response) @@ -291,12 +299,13 @@ async def begin_create( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, datastore_name=datastore_name, - datastore=datastore, + net_app_volume=net_app_volume, + disk_pool_volume=disk_pool_volume, cls=lambda x,y,z: x, **kwargs ) @@ -331,7 +340,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore async def _delete_initial( self, @@ -339,14 +348,14 @@ async def _delete_initial( private_cloud_name: str, cluster_name: str, datastore_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -387,7 +396,7 @@ async def begin_delete( private_cloud_name: str, cluster_name: str, datastore_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a datastore in a private cloud cluster. @@ -403,8 +412,8 @@ async def begin_delete( :type datastore_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py index 90276b4e3df..53bf3e1bad1 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -45,7 +47,7 @@ def list( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GlobalReachConnectionList"]: """List global reach connections in a private cloud. @@ -65,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +124,7 @@ async def get( resource_group_name: str, private_cloud_name: str, global_reach_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.GlobalReachConnection": """Get a global reach connection by name in a private cloud. @@ -144,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,15 +188,18 @@ async def _create_or_update_initial( resource_group_name: str, private_cloud_name: str, global_reach_connection_name: str, - global_reach_connection: "_models.GlobalReachConnection", - **kwargs + authorization_key: Optional[str] = None, + peer_express_route_circuit: Optional[str] = None, + **kwargs: Any ) -> "_models.GlobalReachConnection": cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _global_reach_connection = _models.GlobalReachConnection(authorization_key=authorization_key, peer_express_route_circuit=peer_express_route_circuit) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +223,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(global_reach_connection, 'GlobalReachConnection') + body_content = self._serialize.body(_global_reach_connection, 'GlobalReachConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -245,8 +250,9 @@ async def begin_create_or_update( resource_group_name: str, private_cloud_name: str, global_reach_connection_name: str, - global_reach_connection: "_models.GlobalReachConnection", - **kwargs + authorization_key: Optional[str] = None, + peer_express_route_circuit: Optional[str] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.GlobalReachConnection"]: """Create or update a global reach connection in a private cloud. @@ -258,12 +264,16 @@ async def begin_create_or_update( :type private_cloud_name: str :param global_reach_connection_name: Name of the global reach connection in the private cloud. :type global_reach_connection_name: str - :param global_reach_connection: A global reach connection in the private cloud. - :type global_reach_connection: ~avs_client.models.GlobalReachConnection + :param authorization_key: Authorization key from the peer express route used for the global + reach connection. + :type authorization_key: str + :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the + global reach connection. + :type peer_express_route_circuit: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GlobalReachConnection or the result of cls(response) @@ -282,7 +292,8 @@ async def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, global_reach_connection_name=global_reach_connection_name, - global_reach_connection=global_reach_connection, + authorization_key=authorization_key, + peer_express_route_circuit=peer_express_route_circuit, cls=lambda x,y,z: x, **kwargs ) @@ -323,14 +334,14 @@ async def _delete_initial( resource_group_name: str, private_cloud_name: str, global_reach_connection_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -369,7 +380,7 @@ async def begin_delete( resource_group_name: str, private_cloud_name: str, global_reach_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a global reach connection in a private cloud. @@ -383,8 +394,8 @@ async def begin_delete( :type global_reach_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py index a5871289cca..b7077fc376b 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -43,7 +45,7 @@ def list( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.HcxEnterpriseSiteList"]: """List HCX Enterprise Sites in a private cloud. @@ -63,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -120,7 +122,7 @@ async def get( resource_group_name: str, private_cloud_name: str, hcx_enterprise_site_name: str, - **kwargs + **kwargs: Any ) -> "_models.HcxEnterpriseSite": """Get an HCX Enterprise Site by name in a private cloud. @@ -142,7 +144,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -184,8 +186,7 @@ async def create_or_update( resource_group_name: str, private_cloud_name: str, hcx_enterprise_site_name: str, - hcx_enterprise_site: "_models.HcxEnterpriseSite", - **kwargs + **kwargs: Any ) -> "_models.HcxEnterpriseSite": """Create or update an HCX Enterprise Site in a private cloud. @@ -197,8 +198,6 @@ async def create_or_update( :type private_cloud_name: str :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. :type hcx_enterprise_site_name: str - :param hcx_enterprise_site: The HCX Enterprise Site. - :type hcx_enterprise_site: ~avs_client.models.HcxEnterpriseSite :keyword callable cls: A custom type or function that will be passed the direct response :return: HcxEnterpriseSite, or the result of cls(response) :rtype: ~avs_client.models.HcxEnterpriseSite @@ -209,7 +208,9 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _hcx_enterprise_site = _models.HcxEnterpriseSite() + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -233,7 +234,7 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(hcx_enterprise_site, 'HcxEnterpriseSite') + body_content = self._serialize.body(_hcx_enterprise_site, 'HcxEnterpriseSite') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -260,7 +261,7 @@ async def delete( resource_group_name: str, private_cloud_name: str, hcx_enterprise_site_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an HCX Enterprise Site in a private cloud. @@ -282,7 +283,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py index 44e9a643a95..0aa93c924ff 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Generic, Optional, TypeVar @@ -41,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def check_trial_availability( self, location: str, - **kwargs + **kwargs: Any ) -> "_models.Trial": """Return trial status for subscription by region. @@ -57,7 +59,7 @@ async def check_trial_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -95,7 +97,7 @@ async def check_trial_availability( async def check_quota_availability( self, location: str, - **kwargs + **kwargs: Any ) -> "_models.Quota": """Return quota for subscription by region. @@ -111,7 +113,7 @@ async def check_quota_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py index a18e99775aa..507c63fc576 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar @@ -41,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists all of the available operations. @@ -55,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py index 66cdf95c0f9..0608f5fb87f 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -44,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateCloudList"]: """List private clouds in a resource group. @@ -62,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +117,7 @@ async def get_next(next_link=None): def list_in_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateCloudList"]: """List private clouds in a subscription. @@ -131,7 +133,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -185,7 +187,7 @@ async def get( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateCloud": """Get a private cloud. @@ -205,7 +207,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -246,14 +248,14 @@ async def _create_or_update_initial( resource_group_name: str, private_cloud_name: str, private_cloud: "_models.PrivateCloud", - **kwargs + **kwargs: Any ) -> "_models.PrivateCloud": cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -303,7 +305,7 @@ async def begin_create_or_update( resource_group_name: str, private_cloud_name: str, private_cloud: "_models.PrivateCloud", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateCloud"]: """Create or update a private cloud. @@ -317,8 +319,8 @@ async def begin_create_or_update( :type private_cloud: ~avs_client.models.PrivateCloud :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateCloud or the result of cls(response) @@ -376,14 +378,14 @@ async def _update_initial( resource_group_name: str, private_cloud_name: str, private_cloud_update: "_models.PrivateCloudUpdate", - **kwargs + **kwargs: Any ) -> "_models.PrivateCloud": cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -433,7 +435,7 @@ async def begin_update( resource_group_name: str, private_cloud_name: str, private_cloud_update: "_models.PrivateCloudUpdate", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateCloud"]: """Update a private cloud. @@ -447,8 +449,8 @@ async def begin_update( :type private_cloud_update: ~avs_client.models.PrivateCloudUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateCloud or the result of cls(response) @@ -505,14 +507,14 @@ async def _delete_initial( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -549,7 +551,7 @@ async def begin_delete( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a private cloud. @@ -561,8 +563,8 @@ async def begin_delete( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -615,14 +617,14 @@ async def _rotate_vcenter_password_initial( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -659,7 +661,7 @@ async def begin_rotate_vcenter_password( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Rotate the vCenter password. @@ -671,8 +673,8 @@ async def begin_rotate_vcenter_password( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -725,14 +727,14 @@ async def _rotate_nsxt_password_initial( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -769,7 +771,7 @@ async def begin_rotate_nsxt_password( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Rotate the NSX-T Manager password. @@ -781,8 +783,8 @@ async def begin_rotate_nsxt_password( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -835,7 +837,7 @@ async def list_admin_credentials( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> "_models.AdminCredentials": """List the admin credentials for the private cloud. @@ -855,7 +857,7 @@ async def list_admin_credentials( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py new file mode 100644 index 00000000000..50f340fcd4e --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py @@ -0,0 +1,188 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ScriptCmdletsOperations: + """ScriptCmdletsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + private_cloud_name: str, + script_package_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ScriptCmdletsList"]: + """Return script cmdlet resources available for a private cloud to create a script execution + resource on their Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptCmdletsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptCmdletsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdletsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptCmdletsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_cloud_name: str, + script_package_name: str, + script_cmdlet_name: str, + **kwargs: Any + ) -> "_models.ScriptCmdlet": + """Return information about a script cmdlet resource in a specific package on a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :param script_cmdlet_name: Name of the script cmdlet resource in the script package in the + private cloud. + :type script_cmdlet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptCmdlet, or the result of cls(response) + :rtype: ~avs_client.models.ScriptCmdlet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdlet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + 'scriptCmdletName': self._serialize.url("script_cmdlet_name", script_cmdlet_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptCmdlet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py new file mode 100644 index 00000000000..bf302ecd17f --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py @@ -0,0 +1,512 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ScriptExecutionsOperations: + """ScriptExecutionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + private_cloud_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ScriptExecutionsList"]: + """Get an script execution resource by name in a private cloud. + + Get an script execution resource by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptExecutionsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptExecutionsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecutionsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptExecutionsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + **kwargs: Any + ) -> "_models.ScriptExecution": + """Get an script execution resource by name in a private cloud. + + Get an script execution resource by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptExecution, or the result of cls(response) + :rtype: ~avs_client.models.ScriptExecution + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + script_execution: "_models.ScriptExecution", + **kwargs: Any + ) -> "_models.ScriptExecution": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(script_execution, 'ScriptExecution') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + script_execution: "_models.ScriptExecution", + **kwargs: Any + ) -> AsyncLROPoller["_models.ScriptExecution"]: + """Create or update a script execution resource in a private cloud. + + Create or update a script execution resource in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: The name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :param script_execution: A script running in the private cloud. + :type script_execution: ~avs_client.models.ScriptExecution + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ScriptExecution or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.ScriptExecution] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + script_execution_name=script_execution_name, + script_execution=script_execution, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Cancel a ScriptExecution in a private cloud. + + Cancel a ScriptExecution in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + script_execution_name=script_execution_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + async def get_execution_logs( + self, + resource_group_name: str, + private_cloud_name: str, + script_execution_name: str, + script_output_stream_type: Optional[List[Union[str, "_models.ScriptOutputStreamType"]]] = None, + **kwargs: Any + ) -> "_models.ScriptExecution": + """Return the logs for a script execution resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :param script_output_stream_type: Name of the desired output stream to return. If not provided, + will return all. An empty array will return nothing. + :type script_output_stream_type: list[str or ~avs_client.models.ScriptOutputStreamType] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptExecution, or the result of cls(response) + :rtype: ~avs_client.models.ScriptExecution + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.get_execution_logs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if script_output_stream_type is not None: + body_content = self._serialize.body(script_output_stream_type, '[str]') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_execution_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py new file mode 100644 index 00000000000..e7322288107 --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py @@ -0,0 +1,178 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ScriptPackagesOperations: + """ScriptPackagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + private_cloud_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ScriptPackagesList"]: + """Return script packages available for a private cloud to run on their Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptPackagesList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptPackagesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackagesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptPackagesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_cloud_name: str, + script_package_name: str, + **kwargs: Any + ) -> "_models.ScriptPackage": + """Return script package available to run on an Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptPackage, or the result of cls(response) + :rtype: ~avs_client.models.ScriptPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py index d685eca7a41..62c7ed9ef8a 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union @@ -45,7 +47,7 @@ def list_segments( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkSegmentsList"]: """List of segments in a private cloud workload network. @@ -65,7 +67,7 @@ def list_segments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +124,7 @@ async def get_segment( resource_group_name: str, private_cloud_name: str, segment_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkSegment": """Get a segment by id in a private cloud workload network. @@ -144,7 +146,7 @@ async def get_segment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -187,14 +189,14 @@ async def _create_segments_initial( private_cloud_name: str, segment_id: str, workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkSegment": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -246,7 +248,7 @@ async def begin_create_segments( private_cloud_name: str, segment_id: str, workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkSegment"]: """Create a segment by id in a private cloud workload network. @@ -262,8 +264,8 @@ async def begin_create_segments( :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkSegment or the result of cls(response) @@ -324,14 +326,14 @@ async def _update_segments_initial( private_cloud_name: str, segment_id: str, workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadNetworkSegment"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkSegment"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -381,7 +383,7 @@ async def begin_update_segments( private_cloud_name: str, segment_id: str, workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkSegment"]: """Create or update a segment by id in a private cloud workload network. @@ -397,8 +399,8 @@ async def begin_update_segments( :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkSegment or the result of cls(response) @@ -458,14 +460,14 @@ async def _delete_segment_initial( resource_group_name: str, private_cloud_name: str, segment_id: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -504,7 +506,7 @@ async def begin_delete_segment( resource_group_name: str, private_cloud_name: str, segment_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a segment by id in a private cloud workload network. @@ -518,8 +520,8 @@ async def begin_delete_segment( :type segment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -574,7 +576,7 @@ def list_dhcp( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkDhcpList"]: """List dhcp in a private cloud workload network. @@ -594,7 +596,7 @@ def list_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -651,7 +653,7 @@ async def get_dhcp( resource_group_name: str, dhcp_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkDhcp": """Get dhcp by id in a private cloud workload network. @@ -673,7 +675,7 @@ async def get_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -715,15 +717,17 @@ async def _create_dhcp_initial( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs + properties: Optional["_models.WorkloadNetworkDhcpEntity"] = None, + **kwargs: Any ) -> "_models.WorkloadNetworkDhcp": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _workload_network_dhcp = _models.WorkloadNetworkDhcp(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -747,7 +751,7 @@ async def _create_dhcp_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') + body_content = self._serialize.body(_workload_network_dhcp, 'WorkloadNetworkDhcp') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -774,8 +778,8 @@ async def begin_create_dhcp( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs + properties: Optional["_models.WorkloadNetworkDhcpEntity"] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDhcp"]: """Create dhcp by id in a private cloud workload network. @@ -787,12 +791,12 @@ async def begin_create_dhcp( :type private_cloud_name: str :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) @@ -811,7 +815,7 @@ async def begin_create_dhcp( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -852,15 +856,17 @@ async def _update_dhcp_initial( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs + properties: Optional["_models.WorkloadNetworkDhcpEntity"] = None, + **kwargs: Any ) -> Optional["_models.WorkloadNetworkDhcp"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDhcp"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _workload_network_dhcp = _models.WorkloadNetworkDhcp(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -884,7 +890,7 @@ async def _update_dhcp_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') + body_content = self._serialize.body(_workload_network_dhcp, 'WorkloadNetworkDhcp') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -909,8 +915,8 @@ async def begin_update_dhcp( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs + properties: Optional["_models.WorkloadNetworkDhcpEntity"] = None, + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDhcp"]: """Create or update dhcp by id in a private cloud workload network. @@ -922,12 +928,12 @@ async def begin_update_dhcp( :type private_cloud_name: str :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) @@ -946,7 +952,7 @@ async def begin_update_dhcp( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -987,14 +993,14 @@ async def _delete_dhcp_initial( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1033,7 +1039,7 @@ async def begin_delete_dhcp( resource_group_name: str, private_cloud_name: str, dhcp_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete dhcp by id in a private cloud workload network. @@ -1047,8 +1053,8 @@ async def begin_delete_dhcp( :type dhcp_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1103,7 +1109,7 @@ def list_gateways( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkGatewayList"]: """List of gateways in a private cloud workload network. @@ -1123,7 +1129,7 @@ def list_gateways( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1180,7 +1186,7 @@ async def get_gateway( resource_group_name: str, private_cloud_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkGateway": """Get a gateway by id in a private cloud workload network. @@ -1202,7 +1208,7 @@ async def get_gateway( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1243,7 +1249,7 @@ def list_port_mirroring( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkPortMirroringList"]: """List of port mirroring profiles in a private cloud workload network. @@ -1263,7 +1269,7 @@ def list_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1320,7 +1326,7 @@ async def get_port_mirroring( resource_group_name: str, private_cloud_name: str, port_mirroring_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkPortMirroring": """Get a port mirroring profile by id in a private cloud workload network. @@ -1343,7 +1349,7 @@ async def get_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1386,14 +1392,14 @@ async def _create_port_mirroring_initial( private_cloud_name: str, port_mirroring_id: str, workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkPortMirroring": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1445,7 +1451,7 @@ async def begin_create_port_mirroring( private_cloud_name: str, port_mirroring_id: str, workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkPortMirroring"]: """Create a port mirroring profile by id in a private cloud workload network. @@ -1462,8 +1468,8 @@ async def begin_create_port_mirroring( :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) @@ -1524,14 +1530,14 @@ async def _update_port_mirroring_initial( private_cloud_name: str, port_mirroring_id: str, workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadNetworkPortMirroring"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkPortMirroring"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1581,7 +1587,7 @@ async def begin_update_port_mirroring( private_cloud_name: str, port_mirroring_id: str, workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkPortMirroring"]: """Create or update a port mirroring profile by id in a private cloud workload network. @@ -1598,8 +1604,8 @@ async def begin_update_port_mirroring( :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) @@ -1659,14 +1665,14 @@ async def _delete_port_mirroring_initial( resource_group_name: str, port_mirroring_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1705,7 +1711,7 @@ async def begin_delete_port_mirroring( resource_group_name: str, port_mirroring_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a port mirroring profile by id in a private cloud workload network. @@ -1720,8 +1726,8 @@ async def begin_delete_port_mirroring( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1776,7 +1782,7 @@ def list_vm_groups( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkVMGroupsList"]: """List of vm groups in a private cloud workload network. @@ -1796,7 +1802,7 @@ def list_vm_groups( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1853,7 +1859,7 @@ async def get_vm_group( resource_group_name: str, private_cloud_name: str, vm_group_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkVMGroup": """Get a vm group by id in a private cloud workload network. @@ -1875,7 +1881,7 @@ async def get_vm_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1918,14 +1924,14 @@ async def _create_vm_group_initial( private_cloud_name: str, vm_group_id: str, workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkVMGroup": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1977,7 +1983,7 @@ async def begin_create_vm_group( private_cloud_name: str, vm_group_id: str, workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkVMGroup"]: """Create a vm group by id in a private cloud workload network. @@ -1993,8 +1999,8 @@ async def begin_create_vm_group( :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) @@ -2055,14 +2061,14 @@ async def _update_vm_group_initial( private_cloud_name: str, vm_group_id: str, workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadNetworkVMGroup"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkVMGroup"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2112,7 +2118,7 @@ async def begin_update_vm_group( private_cloud_name: str, vm_group_id: str, workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkVMGroup"]: """Create or update a vm group by id in a private cloud workload network. @@ -2128,8 +2134,8 @@ async def begin_update_vm_group( :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) @@ -2189,14 +2195,14 @@ async def _delete_vm_group_initial( resource_group_name: str, vm_group_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2235,7 +2241,7 @@ async def begin_delete_vm_group( resource_group_name: str, vm_group_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a vm group by id in a private cloud workload network. @@ -2249,8 +2255,8 @@ async def begin_delete_vm_group( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -2305,7 +2311,7 @@ def list_virtual_machines( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkVirtualMachinesList"]: """List of virtual machines in a private cloud workload network. @@ -2325,7 +2331,7 @@ def list_virtual_machines( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -2382,7 +2388,7 @@ async def get_virtual_machine( resource_group_name: str, private_cloud_name: str, virtual_machine_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkVirtualMachine": """Get a virtual machine by id in a private cloud workload network. @@ -2392,7 +2398,7 @@ async def get_virtual_machine( :type resource_group_name: str :param private_cloud_name: Name of the private cloud. :type private_cloud_name: str - :param virtual_machine_id: NSX Virtual Machine identifier. + :param virtual_machine_id: Virtual Machine identifier. :type virtual_machine_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WorkloadNetworkVirtualMachine, or the result of cls(response) @@ -2404,7 +2410,7 @@ async def get_virtual_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2445,7 +2451,7 @@ def list_dns_services( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkDnsServicesList"]: """List of DNS services in a private cloud workload network. @@ -2465,7 +2471,7 @@ def list_dns_services( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -2522,7 +2528,7 @@ async def get_dns_service( resource_group_name: str, private_cloud_name: str, dns_service_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkDnsService": """Get a DNS service by id in a private cloud workload network. @@ -2545,7 +2551,7 @@ async def get_dns_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2588,14 +2594,14 @@ async def _create_dns_service_initial( private_cloud_name: str, dns_service_id: str, workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkDnsService": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2647,7 +2653,7 @@ async def begin_create_dns_service( private_cloud_name: str, dns_service_id: str, workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDnsService"]: """Create a DNS service by id in a private cloud workload network. @@ -2664,8 +2670,8 @@ async def begin_create_dns_service( :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) @@ -2726,14 +2732,14 @@ async def _update_dns_service_initial( private_cloud_name: str, dns_service_id: str, workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadNetworkDnsService"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsService"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2783,7 +2789,7 @@ async def begin_update_dns_service( private_cloud_name: str, dns_service_id: str, workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDnsService"]: """Create or update a DNS service by id in a private cloud workload network. @@ -2800,8 +2806,8 @@ async def begin_update_dns_service( :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) @@ -2861,14 +2867,14 @@ async def _delete_dns_service_initial( resource_group_name: str, dns_service_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2907,7 +2913,7 @@ async def begin_delete_dns_service( resource_group_name: str, dns_service_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a DNS service by id in a private cloud workload network. @@ -2922,8 +2928,8 @@ async def begin_delete_dns_service( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -2978,7 +2984,7 @@ def list_dns_zones( self, resource_group_name: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadNetworkDnsZonesList"]: """List of DNS zones in a private cloud workload network. @@ -2998,7 +3004,7 @@ def list_dns_zones( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -3055,7 +3061,7 @@ async def get_dns_zone( resource_group_name: str, private_cloud_name: str, dns_zone_id: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkDnsZone": """Get a DNS zone by id in a private cloud workload network. @@ -3077,7 +3083,7 @@ async def get_dns_zone( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -3120,14 +3126,14 @@ async def _create_dns_zone_initial( private_cloud_name: str, dns_zone_id: str, workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs + **kwargs: Any ) -> "_models.WorkloadNetworkDnsZone": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3179,7 +3185,7 @@ async def begin_create_dns_zone( private_cloud_name: str, dns_zone_id: str, workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDnsZone"]: """Create a DNS zone by id in a private cloud workload network. @@ -3195,8 +3201,8 @@ async def begin_create_dns_zone( :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) @@ -3257,14 +3263,14 @@ async def _update_dns_zone_initial( private_cloud_name: str, dns_zone_id: str, workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadNetworkDnsZone"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsZone"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3314,7 +3320,7 @@ async def begin_update_dns_zone( private_cloud_name: str, dns_zone_id: str, workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadNetworkDnsZone"]: """Create or update a DNS zone by id in a private cloud workload network. @@ -3330,8 +3336,8 @@ async def begin_update_dns_zone( :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) @@ -3391,14 +3397,14 @@ async def _delete_dns_zone_initial( resource_group_name: str, dns_zone_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -3437,7 +3443,7 @@ async def begin_delete_dns_zone( resource_group_name: str, dns_zone_id: str, private_cloud_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a DNS zone by id in a private cloud workload network. @@ -3451,8 +3457,8 @@ async def begin_delete_dns_zone( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -3502,3 +3508,407 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore + + def list_public_i_ps( + self, + resource_group_name: str, + private_cloud_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WorkloadNetworkPublicIPsList"]: + """List of Public IP Blocks in a private cloud workload network. + + List of Public IP Blocks in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadNetworkPublicIPsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkPublicIPsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIPsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_i_ps.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkloadNetworkPublicIPsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_public_i_ps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs'} # type: ignore + + async def get_public_ip( + self, + resource_group_name: str, + private_cloud_name: str, + public_ip_id: str, + **kwargs: Any + ) -> "_models.WorkloadNetworkPublicIP": + """Get a Public IP Block by id in a private cloud workload network. + + Get a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkloadNetworkPublicIP, or the result of cls(response) + :rtype: ~avs_client.models.WorkloadNetworkPublicIP + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get_public_ip.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + async def _create_public_ip_initial( + self, + resource_group_name: str, + private_cloud_name: str, + public_ip_id: str, + display_name: Optional[str] = None, + number_of_public_i_ps: Optional[int] = None, + **kwargs: Any + ) -> "_models.WorkloadNetworkPublicIP": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _workload_network_public_ip = _models.WorkloadNetworkPublicIP(display_name=display_name, number_of_public_i_ps=number_of_public_i_ps) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_public_ip_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_workload_network_public_ip, 'WorkloadNetworkPublicIP') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + async def begin_create_public_ip( + self, + resource_group_name: str, + private_cloud_name: str, + public_ip_id: str, + display_name: Optional[str] = None, + number_of_public_i_ps: Optional[int] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.WorkloadNetworkPublicIP"]: + """Create a Public IP Block by id in a private cloud workload network. + + Create a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :param display_name: Display name of the Public IP Block. + :type display_name: str + :param number_of_public_i_ps: Number of Public IPs requested. + :type number_of_public_i_ps: long + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPublicIP or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkPublicIP] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_public_ip_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + public_ip_id=public_ip_id, + display_name=display_name, + number_of_public_i_ps=number_of_public_i_ps, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + async def _delete_public_ip_initial( + self, + resource_group_name: str, + public_ip_id: str, + private_cloud_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_public_ip_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + async def begin_delete_public_ip( + self, + resource_group_name: str, + public_ip_id: str, + private_cloud_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a Public IP Block by id in a private cloud workload network. + + Delete a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_public_ip_initial( + resource_group_name=resource_group_name, + public_ip_id=public_ip_id, + private_cloud_name=private_cloud_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py index fd15cc64bf0..819b169fecf 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py @@ -1,17 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import Addon + from ._models_py3 import AddonHcxProperties from ._models_py3 import AddonList from ._models_py3 import AddonProperties from ._models_py3 import AddonSrmProperties - from ._models_py3 import AddonUpdate + from ._models_py3 import AddonVrProperties from ._models_py3 import AdminCredentials from ._models_py3 import Circuit + from ._models_py3 import CloudLink + from ._models_py3 import CloudLinkList from ._models_py3 import Cluster from ._models_py3 import ClusterList from ._models_py3 import ClusterProperties @@ -39,6 +44,7 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationList from ._models_py3 import OperationProperties + from ._models_py3 import PSCredentialExecutionParameter from ._models_py3 import PrivateCloud from ._models_py3 import PrivateCloudList from ._models_py3 import PrivateCloudProperties @@ -47,6 +53,16 @@ from ._models_py3 import ProxyResource from ._models_py3 import Quota from ._models_py3 import Resource + from ._models_py3 import ScriptCmdlet + from ._models_py3 import ScriptCmdletsList + from ._models_py3 import ScriptExecution + from ._models_py3 import ScriptExecutionParameter + from ._models_py3 import ScriptExecutionsList + from ._models_py3 import ScriptPackage + from ._models_py3 import ScriptPackagesList + from ._models_py3 import ScriptParameter + from ._models_py3 import ScriptSecureStringExecutionParameter + from ._models_py3 import ScriptStringExecutionParameter from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import TrackedResource @@ -64,6 +80,8 @@ from ._models_py3 import WorkloadNetworkGatewayList from ._models_py3 import WorkloadNetworkPortMirroring from ._models_py3 import WorkloadNetworkPortMirroringList + from ._models_py3 import WorkloadNetworkPublicIP + from ._models_py3 import WorkloadNetworkPublicIPsList from ._models_py3 import WorkloadNetworkSegment from ._models_py3 import WorkloadNetworkSegmentPortVif from ._models_py3 import WorkloadNetworkSegmentSubnet @@ -74,12 +92,15 @@ from ._models_py3 import WorkloadNetworkVirtualMachinesList except (SyntaxError, ImportError): from ._models import Addon # type: ignore + from ._models import AddonHcxProperties # type: ignore from ._models import AddonList # type: ignore from ._models import AddonProperties # type: ignore from ._models import AddonSrmProperties # type: ignore - from ._models import AddonUpdate # type: ignore + from ._models import AddonVrProperties # type: ignore from ._models import AdminCredentials # type: ignore from ._models import Circuit # type: ignore + from ._models import CloudLink # type: ignore + from ._models import CloudLinkList # type: ignore from ._models import Cluster # type: ignore from ._models import ClusterList # type: ignore from ._models import ClusterProperties # type: ignore @@ -107,6 +128,7 @@ from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore from ._models import OperationProperties # type: ignore + from ._models import PSCredentialExecutionParameter # type: ignore from ._models import PrivateCloud # type: ignore from ._models import PrivateCloudList # type: ignore from ._models import PrivateCloudProperties # type: ignore @@ -115,6 +137,16 @@ from ._models import ProxyResource # type: ignore from ._models import Quota # type: ignore from ._models import Resource # type: ignore + from ._models import ScriptCmdlet # type: ignore + from ._models import ScriptCmdletsList # type: ignore + from ._models import ScriptExecution # type: ignore + from ._models import ScriptExecutionParameter # type: ignore + from ._models import ScriptExecutionsList # type: ignore + from ._models import ScriptPackage # type: ignore + from ._models import ScriptPackagesList # type: ignore + from ._models import ScriptParameter # type: ignore + from ._models import ScriptSecureStringExecutionParameter # type: ignore + from ._models import ScriptStringExecutionParameter # type: ignore from ._models import ServiceSpecification # type: ignore from ._models import Sku # type: ignore from ._models import TrackedResource # type: ignore @@ -132,6 +164,8 @@ from ._models import WorkloadNetworkGatewayList # type: ignore from ._models import WorkloadNetworkPortMirroring # type: ignore from ._models import WorkloadNetworkPortMirroringList # type: ignore + from ._models import WorkloadNetworkPublicIP # type: ignore + from ._models import WorkloadNetworkPublicIPsList # type: ignore from ._models import WorkloadNetworkSegment # type: ignore from ._models import WorkloadNetworkSegmentPortVif # type: ignore from ._models import WorkloadNetworkSegmentSubnet # type: ignore @@ -144,6 +178,7 @@ from ._avs_client_enums import ( AddonProvisioningState, AddonType, + CloudLinkStatus, ClusterProvisioningState, DatastoreProvisioningState, DhcpTypeEnum, @@ -154,31 +189,42 @@ GlobalReachConnectionStatus, HcxEnterpriseSiteStatus, InternetEnum, + MountOptionEnum, + OptionalParamEnum, PortMirroringDirectionEnum, PortMirroringStatusEnum, PrivateCloudProvisioningState, QuotaEnabled, + ScriptExecutionParameterType, + ScriptExecutionProvisioningState, + ScriptOutputStreamType, + ScriptParameterTypes, SegmentStatusEnum, SslEnum, TrialStatus, VMGroupStatusEnum, VMTypeEnum, + VisibilityParameterEnum, WorkloadNetworkDhcpProvisioningState, WorkloadNetworkDnsServiceProvisioningState, WorkloadNetworkDnsZoneProvisioningState, WorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPublicIPProvisioningState, WorkloadNetworkSegmentProvisioningState, WorkloadNetworkVMGroupProvisioningState, ) __all__ = [ 'Addon', + 'AddonHcxProperties', 'AddonList', 'AddonProperties', 'AddonSrmProperties', - 'AddonUpdate', + 'AddonVrProperties', 'AdminCredentials', 'Circuit', + 'CloudLink', + 'CloudLinkList', 'Cluster', 'ClusterList', 'ClusterProperties', @@ -206,6 +252,7 @@ 'OperationDisplay', 'OperationList', 'OperationProperties', + 'PSCredentialExecutionParameter', 'PrivateCloud', 'PrivateCloudList', 'PrivateCloudProperties', @@ -214,6 +261,16 @@ 'ProxyResource', 'Quota', 'Resource', + 'ScriptCmdlet', + 'ScriptCmdletsList', + 'ScriptExecution', + 'ScriptExecutionParameter', + 'ScriptExecutionsList', + 'ScriptPackage', + 'ScriptPackagesList', + 'ScriptParameter', + 'ScriptSecureStringExecutionParameter', + 'ScriptStringExecutionParameter', 'ServiceSpecification', 'Sku', 'TrackedResource', @@ -231,6 +288,8 @@ 'WorkloadNetworkGatewayList', 'WorkloadNetworkPortMirroring', 'WorkloadNetworkPortMirroringList', + 'WorkloadNetworkPublicIP', + 'WorkloadNetworkPublicIPsList', 'WorkloadNetworkSegment', 'WorkloadNetworkSegmentPortVif', 'WorkloadNetworkSegmentSubnet', @@ -241,6 +300,7 @@ 'WorkloadNetworkVirtualMachinesList', 'AddonProvisioningState', 'AddonType', + 'CloudLinkStatus', 'ClusterProvisioningState', 'DatastoreProvisioningState', 'DhcpTypeEnum', @@ -251,19 +311,27 @@ 'GlobalReachConnectionStatus', 'HcxEnterpriseSiteStatus', 'InternetEnum', + 'MountOptionEnum', + 'OptionalParamEnum', 'PortMirroringDirectionEnum', 'PortMirroringStatusEnum', 'PrivateCloudProvisioningState', 'QuotaEnabled', + 'ScriptExecutionParameterType', + 'ScriptExecutionProvisioningState', + 'ScriptOutputStreamType', + 'ScriptParameterTypes', 'SegmentStatusEnum', 'SslEnum', 'TrialStatus', 'VMGroupStatusEnum', 'VMTypeEnum', + 'VisibilityParameterEnum', 'WorkloadNetworkDhcpProvisioningState', 'WorkloadNetworkDnsServiceProvisioningState', 'WorkloadNetworkDnsZoneProvisioningState', 'WorkloadNetworkPortMirroringProvisioningState', + 'WorkloadNetworkPublicIPProvisioningState', 'WorkloadNetworkSegmentProvisioningState', 'WorkloadNetworkVMGroupProvisioningState', ] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py index c902b578e59..f0a7e9e57cd 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -41,6 +43,17 @@ class AddonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SRM = "SRM" VR = "VR" + HCX = "HCX" + +class CloudLinkStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the cloud link. + """ + + ACTIVE = "Active" + BUILDING = "Building" + DELETING = "Deleting" + FAILED = "Failed" + DISCONNECTED = "Disconnected" class ClusterProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The state of the cluster provisioning @@ -59,14 +72,17 @@ class DatastoreProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, E SUCCEEDED = "Succeeded" FAILED = "Failed" CANCELLED = "Cancelled" - DELETING = "Deleting" + PENDING = "Pending" + CREATING = "Creating" UPDATING = "Updating" + DELETING = "Deleting" class DhcpTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of DHCP: SERVER or RELAY. """ - SERVER_RELAY = "SERVER, RELAY" + SERVER = "SERVER" + RELAY = "RELAY" class DnsServiceLogLevelEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """DNS Service log level. @@ -125,6 +141,20 @@ class InternetEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENABLED = "Enabled" DISABLED = "Disabled" +class MountOptionEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN + """ + + MOUNT = "MOUNT" + ATTACH = "ATTACH" + +class OptionalParamEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Is this parameter required or optional + """ + + OPTIONAL = "Optional" + REQUIRED = "Required" + class PortMirroringDirectionEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Direction of port mirroring profile. """ @@ -156,6 +186,44 @@ class QuotaEnabled(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENABLED = "Enabled" DISABLED = "Disabled" +class ScriptExecutionParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of execution parameter + """ + + VALUE = "Value" + SECURE_VALUE = "SecureValue" + CREDENTIAL = "Credential" + +class ScriptExecutionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the script execution resource + """ + + PENDING = "Pending" + RUNNING = "Running" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELLING = "Cancelling" + CANCELLED = "Cancelled" + DELETING = "Deleting" + +class ScriptOutputStreamType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + INFORMATION = "Information" + WARNING = "Warning" + OUTPUT = "Output" + ERROR = "Error" + +class ScriptParameterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of parameter the script is expecting. psCredential is a PSCredentialObject + """ + + STRING = "String" + SECURE_STRING = "SecureString" + CREDENTIAL = "Credential" + INT = "Int" + BOOL = "Bool" + FLOAT = "Float" + class SegmentStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Segment status. """ @@ -177,6 +245,13 @@ class TrialStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TRIAL_USED = "TrialUsed" TRIAL_DISABLED = "TrialDisabled" +class VisibilityParameterEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Should this parameter be visible to arm and passed in the parameters argument when executing + """ + + VISIBLE = "Visible" + HIDDEN = "Hidden" + class VMGroupStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """VM Group status. """ @@ -229,6 +304,16 @@ class WorkloadNetworkPortMirroringProvisioningState(with_metaclass(_CaseInsensit DELETING = "Deleting" UPDATING = "Updating" +class WorkloadNetworkPublicIPProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The provisioning state + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + BUILDING = "Building" + DELETING = "Deleting" + UPDATING = "Updating" + class WorkloadNetworkSegmentProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state """ diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py index 25b4e933fb8..ad4824ec05c 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -53,29 +55,21 @@ class Addon(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param properties: The properties of an addon resource. + :type properties: ~avs_client.models.AddonProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'license_key': {'key': 'properties.licenseKey', 'type': 'str'}, - 'addon_type': {'key': 'properties.addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AddonProperties'}, } def __init__( @@ -83,11 +77,88 @@ def __init__( **kwargs ): super(Addon, self).__init__(**kwargs) - self.license_key = kwargs.get('license_key', None) - self.addon_type = kwargs.get('addon_type', None) + self.properties = kwargs.get('properties', None) + + +class AddonProperties(msrest.serialization.Model): + """The properties of an addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddonHcxProperties, AddonSrmProperties, AddonVrProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". + :type addon_type: str or ~avs_client.models.AddonType + :ivar provisioning_state: The state of the addon provisioning. Possible values include: + "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + """ + + _validation = { + 'addon_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + _subtype_map = { + 'addon_type': {'HCX': 'AddonHcxProperties', 'SRM': 'AddonSrmProperties', 'VR': 'AddonVrProperties'} + } + + def __init__( + self, + **kwargs + ): + super(AddonProperties, self).__init__(**kwargs) + self.addon_type = None # type: Optional[str] self.provisioning_state = None +class AddonHcxProperties(AddonProperties): + """The properties of an HCX addon. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". + :type addon_type: str or ~avs_client.models.AddonType + :ivar provisioning_state: The state of the addon provisioning. Possible values include: + "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param offer: Required. The HCX offer, example VMware MaaS Cloud Provider (Enterprise). + :type offer: str + """ + + _validation = { + 'addon_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'offer': {'required': True}, + } + + _attribute_map = { + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AddonHcxProperties, self).__init__(**kwargs) + self.addon_type = 'HCX' # type: str + self.offer = kwargs['offer'] + + class AddonList(msrest.serialization.Model): """A paged list of addons. @@ -118,90 +189,80 @@ def __init__( self.next_link = None -class AddonSrmProperties(msrest.serialization.Model): - """The properties of an SRM addon that may be updated. - - :param license_key: The SRM license. - :type license_key: str - """ - - _attribute_map = { - 'license_key': {'key': 'licenseKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonSrmProperties, self).__init__(**kwargs) - self.license_key = kwargs.get('license_key', None) - - -class AddonProperties(AddonSrmProperties): - """The properties of an addon that may be updated. +class AddonSrmProperties(AddonProperties): + """The properties of a Site Recovery Manager (SRM) addon. Variables are only populated by the server, and will be ignored when sending a request. - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". :type addon_type: str or ~avs_client.models.AddonType :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param license_key: Required. The Site Recovery Manager (SRM) license. + :type license_key: str """ _validation = { + 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'license_key': {'required': True}, } _attribute_map = { - 'license_key': {'key': 'licenseKey', 'type': 'str'}, 'addon_type': {'key': 'addonType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'license_key': {'key': 'licenseKey', 'type': 'str'}, } def __init__( self, **kwargs ): - super(AddonProperties, self).__init__(**kwargs) - self.addon_type = kwargs.get('addon_type', None) - self.provisioning_state = None + super(AddonSrmProperties, self).__init__(**kwargs) + self.addon_type = 'SRM' # type: str + self.license_key = kwargs['license_key'] -class AddonUpdate(msrest.serialization.Model): - """An update of an addon resource. +class AddonVrProperties(AddonProperties): + """The properties of a vSphere Replication (VR) addon. Variables are only populated by the server, and will be ignored when sending a request. - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". :type addon_type: str or ~avs_client.models.AddonType :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param vrs_count: Required. The vSphere Replication Server (VRS) count. + :type vrs_count: int """ _validation = { + 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'vrs_count': {'required': True}, } _attribute_map = { - 'license_key': {'key': 'properties.properties.licenseKey', 'type': 'str'}, - 'addon_type': {'key': 'properties.properties.addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.properties.provisioningState', 'type': 'str'}, + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vrs_count': {'key': 'vrsCount', 'type': 'int'}, } def __init__( self, **kwargs ): - super(AddonUpdate, self).__init__(**kwargs) - self.license_key = kwargs.get('license_key', None) - self.addon_type = kwargs.get('addon_type', None) - self.provisioning_state = None + super(AddonVrProperties, self).__init__(**kwargs) + self.addon_type = 'VR' # type: str + self.vrs_count = kwargs['vrs_count'] class AdminCredentials(msrest.serialization.Model): @@ -284,6 +345,78 @@ def __init__( self.express_route_private_peering_id = None +class CloudLink(Resource): + """A cloud link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar status: The state of the cloud link. Possible values include: "Active", "Building", + "Deleting", "Failed", "Disconnected". + :vartype status: str or ~avs_client.models.CloudLinkStatus + :param linked_cloud: Identifier of the other private cloud participating in the link. + :type linked_cloud: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'linked_cloud': {'key': 'properties.linkedCloud', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudLink, self).__init__(**kwargs) + self.status = None + self.linked_cloud = kwargs.get('linked_cloud', None) + + +class CloudLinkList(msrest.serialization.Model): + """A paged list of cloud links. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on a page. + :vartype value: list[~avs_client.models.CloudLink] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CloudLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudLinkList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Cluster(Resource): """A cluster resource. @@ -480,7 +613,7 @@ class Datastore(Resource): :ivar type: Resource type. :vartype type: str :ivar provisioning_state: The state of the datastore provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating". + "Succeeded", "Failed", "Cancelled", "Pending", "Creating", "Updating", "Deleting". :vartype provisioning_state: str or ~avs_client.models.DatastoreProvisioningState :param net_app_volume: An Azure NetApp Files volume. :type net_app_volume: ~avs_client.models.NetAppVolume @@ -547,15 +680,32 @@ def __init__( class DiskPoolVolume(msrest.serialization.Model): """An iSCSI volume from Microsoft.StoragePool provider. - :param endpoints: iSCSI provider target IP address list. - :type endpoints: list[str] - :param lun_name: Name of the LUN to be used. + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_id: Required. Azure resource ID of the iSCSI target. + :type target_id: str + :param lun_name: Required. Name of the LUN to be used for datastore. :type lun_name: str + :param mount_option: Mode that describes whether the LUN has to be mounted as a datastore or + attached as a LUN. Possible values include: "MOUNT", "ATTACH". Default value: "MOUNT". + :type mount_option: str or ~avs_client.models.MountOptionEnum + :ivar path: Device path. + :vartype path: str """ + _validation = { + 'target_id': {'required': True}, + 'lun_name': {'required': True}, + 'path': {'readonly': True}, + } + _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, 'lun_name': {'key': 'lunName', 'type': 'str'}, + 'mount_option': {'key': 'mountOption', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, } def __init__( @@ -563,8 +713,10 @@ def __init__( **kwargs ): super(DiskPoolVolume, self).__init__(**kwargs) - self.endpoints = kwargs.get('endpoints', None) - self.lun_name = kwargs.get('lun_name', None) + self.target_id = kwargs['target_id'] + self.lun_name = kwargs['lun_name'] + self.mount_option = kwargs.get('mount_option', "MOUNT") + self.path = None class Endpoints(msrest.serialization.Model): @@ -610,7 +762,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -1145,15 +1297,18 @@ def __init__( class NetAppVolume(msrest.serialization.Model): """An Azure NetApp Files volume from Microsoft.NetApp provider. - :param nfs_provider_ip: IP address of the NFS provider. - :type nfs_provider_ip: str - :param nfs_file_path: File path through which the NFS volume is exposed by the provider. - :type nfs_file_path: str + All required parameters must be populated in order to send to Azure. + + :param id: Required. Azure resource ID of the NetApp volume. + :type id: str """ + _validation = { + 'id': {'required': True}, + } + _attribute_map = { - 'nfs_provider_ip': {'key': 'nfsProviderIp', 'type': 'str'}, - 'nfs_file_path': {'key': 'nfsFilePath', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__( @@ -1161,8 +1316,7 @@ def __init__( **kwargs ): super(NetAppVolume, self).__init__(**kwargs) - self.nfs_provider_ip = kwargs.get('nfs_provider_ip', None) - self.nfs_file_path = kwargs.get('nfs_file_path', None) + self.id = kwargs['id'] class Operation(msrest.serialization.Model): @@ -1357,7 +1511,7 @@ class PrivateCloud(TrackedResource): :param sku: Required. The private cloud SKU. :type sku: ~avs_client.models.Sku :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1374,6 +1528,8 @@ class PrivateCloud(TrackedResource): as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. :type network_block: str + :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. + :vartype external_cloud_links: list[str] :ivar management_network: Network used to access vCenter Server and NSX-T Manager. :vartype management_network: str :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot @@ -1400,6 +1556,7 @@ class PrivateCloud(TrackedResource): 'sku': {'required': True}, 'provisioning_state': {'readonly': True}, 'endpoints': {'readonly': True}, + 'external_cloud_links': {'readonly': True}, 'management_network': {'readonly': True}, 'provisioning_network': {'readonly': True}, 'vmotion_network': {'readonly': True}, @@ -1414,13 +1571,14 @@ class PrivateCloud(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, 'network_block': {'key': 'properties.networkBlock', 'type': 'str'}, + 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, 'management_network': {'key': 'properties.managementNetwork', 'type': 'str'}, 'provisioning_network': {'key': 'properties.provisioningNetwork', 'type': 'str'}, 'vmotion_network': {'key': 'properties.vmotionNetwork', 'type': 'str'}, @@ -1443,6 +1601,7 @@ def __init__( self.circuit = kwargs.get('circuit', None) self.endpoints = None self.network_block = kwargs.get('network_block', None) + self.external_cloud_links = None self.management_network = None self.provisioning_network = None self.vmotion_network = None @@ -1486,7 +1645,7 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): """The properties of a private cloud resource that may be updated. :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1495,7 +1654,7 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): """ _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, } @@ -1518,7 +1677,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): All required parameters must be populated in order to send to Azure. :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1535,6 +1694,8 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. :type network_block: str + :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. + :vartype external_cloud_links: list[str] :ivar management_network: Network used to access vCenter Server and NSX-T Manager. :vartype management_network: str :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot @@ -1558,6 +1719,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'provisioning_state': {'readonly': True}, 'endpoints': {'readonly': True}, 'network_block': {'required': True}, + 'external_cloud_links': {'readonly': True}, 'management_network': {'readonly': True}, 'provisioning_network': {'readonly': True}, 'vmotion_network': {'readonly': True}, @@ -1566,13 +1728,14 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): } _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'circuit': {'key': 'circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, 'network_block': {'key': 'networkBlock', 'type': 'str'}, + 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, 'management_network': {'key': 'managementNetwork', 'type': 'str'}, 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, @@ -1591,6 +1754,7 @@ def __init__( self.circuit = kwargs.get('circuit', None) self.endpoints = None self.network_block = kwargs['network_block'] + self.external_cloud_links = None self.management_network = None self.provisioning_network = None self.vmotion_network = None @@ -1606,7 +1770,7 @@ class PrivateCloudUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1616,7 +1780,7 @@ class PrivateCloudUpdate(msrest.serialization.Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, } @@ -1664,118 +1828,115 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) -class Quota(msrest.serialization.Model): - """Subscription quotas. +class ScriptExecutionParameter(msrest.serialization.Model): + """The arguments passed in to the execution. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PSCredentialExecutionParameter, ScriptSecureStringExecutionParameter, ScriptStringExecutionParameter. - :ivar hosts_remaining: Remaining hosts quota by sku type. - :vartype hosts_remaining: dict[str, int] - :ivar quota_enabled: Host quota is active for current subscription. Possible values include: - "Enabled", "Disabled". - :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType """ _validation = { - 'hosts_remaining': {'readonly': True}, - 'quota_enabled': {'readonly': True}, + 'name': {'required': True}, + 'type': {'required': True}, } _attribute_map = { - 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, - 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__( - self, - **kwargs - ): - super(Quota, self).__init__(**kwargs) - self.hosts_remaining = None - self.quota_enabled = None - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~avs_client.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~avs_client.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + _subtype_map = { + 'type': {'Credential': 'PSCredentialExecutionParameter', 'SecureValue': 'ScriptSecureStringExecutionParameter', 'Value': 'ScriptStringExecutionParameter'} } def __init__( self, **kwargs ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) - self.metric_specifications = kwargs.get('metric_specifications', None) + super(ScriptExecutionParameter, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = None # type: Optional[str] -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. +class PSCredentialExecutionParameter(ScriptExecutionParameter): + """a powershell credential object. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. + :param name: Required. The parameter name. :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param username: username for login. + :type username: str + :param password: password for login. + :type password: str """ _validation = { 'name': {'required': True}, + 'type': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, } def __init__( self, **kwargs ): - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] + super(PSCredentialExecutionParameter, self).__init__(**kwargs) + self.type = 'Credential' # type: str + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) -class Trial(msrest.serialization.Model): - """Subscription trial availability. +class Quota(msrest.serialization.Model): + """Subscription quotas. Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", - "TrialDisabled". - :vartype status: str or ~avs_client.models.TrialStatus - :ivar available_hosts: Number of trial hosts available. - :vartype available_hosts: int + :ivar hosts_remaining: Remaining hosts quota by sku type. + :vartype hosts_remaining: dict[str, int] + :ivar quota_enabled: Host quota is active for current subscription. Possible values include: + "Enabled", "Disabled". + :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled """ _validation = { - 'status': {'readonly': True}, - 'available_hosts': {'readonly': True}, + 'hosts_remaining': {'readonly': True}, + 'quota_enabled': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, + 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, + 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, } def __init__( self, **kwargs ): - super(Trial, self).__init__(**kwargs) - self.status = None - self.available_hosts = None + super(Quota, self).__init__(**kwargs) + self.hosts_remaining = None + self.quota_enabled = None -class WorkloadNetworkDhcp(Resource): - """NSX DHCP. +class ScriptCmdlet(ProxyResource): + """A cmdlet available for script execution. Variables are only populated by the server, and will be ignored when sending a request. @@ -1785,49 +1946,507 @@ class WorkloadNetworkDhcp(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param dhcp_type: Type of DHCP: SERVER or RELAY.Constant filled by server. Possible values - include: "SERVER, RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long + :ivar description: Description of the scripts functionality. + :vartype description: str + :ivar timeout: Recommended time limit for execution. + :vartype timeout: str + :ivar parameters: Parameters the script will accept. + :vartype parameters: list[~avs_client.models.ScriptParameter] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'segments': {'readonly': True}, + 'description': {'readonly': True}, + 'timeout': {'readonly': True}, + 'parameters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'timeout': {'key': 'properties.timeout', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ScriptParameter]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptCmdlet, self).__init__(**kwargs) + self.description = None + self.timeout = None + self.parameters = None + + +class ScriptCmdletsList(msrest.serialization.Model): + """Pageable list of scripts/cmdlets. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of scripts. + :vartype value: list[~avs_client.models.ScriptCmdlet] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptCmdlet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptCmdletsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptExecution(ProxyResource): + """An instance of a script executed by a user - custom or AVS. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param script_cmdlet_id: A reference to the script cmdlet resource if user is running a AVS + script. + :type script_cmdlet_id: str + :param parameters: Parameters the script will accept. + :type parameters: list[~avs_client.models.ScriptExecutionParameter] + :param hidden_parameters: Parameters that will be hidden/not visible to ARM, such as passwords + and credentials. + :type hidden_parameters: list[~avs_client.models.ScriptExecutionParameter] + :param failure_reason: Error message if the script was able to run, but if the script itself + had errors or powershell threw an exception. + :type failure_reason: str + :param timeout: Time limit for execution. + :type timeout: str + :param retention: Time to live for the resource. If not provided, will be available for 60 + days. + :type retention: str + :ivar submitted_at: Time the script execution was submitted. + :vartype submitted_at: ~datetime.datetime + :ivar started_at: Time the script execution was started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: Time the script execution was finished. + :vartype finished_at: ~datetime.datetime + :ivar provisioning_state: The state of the script execution resource. Possible values include: + "Pending", "Running", "Succeeded", "Failed", "Cancelling", "Cancelled", "Deleting". + :vartype provisioning_state: str or ~avs_client.models.ScriptExecutionProvisioningState + :param output: Standard output stream from the powershell execution. + :type output: list[str] + :param named_outputs: User-defined dictionary. + :type named_outputs: dict[str, any] + :ivar information: Standard information out stream from the powershell execution. + :vartype information: list[str] + :ivar warnings: Standard warning out stream from the powershell execution. + :vartype warnings: list[str] + :ivar errors: Standard error output stream from the powershell execution. + :vartype errors: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'submitted_at': {'readonly': True}, + 'started_at': {'readonly': True}, + 'finished_at': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'information': {'readonly': True}, + 'warnings': {'readonly': True}, + 'errors': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'dhcp_type': {'key': 'properties.dhcpType', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'segments': {'key': 'properties.segments', 'type': '[str]'}, + 'script_cmdlet_id': {'key': 'properties.scriptCmdletId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ScriptExecutionParameter]'}, + 'hidden_parameters': {'key': 'properties.hiddenParameters', 'type': '[ScriptExecutionParameter]'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, + 'timeout': {'key': 'properties.timeout', 'type': 'str'}, + 'retention': {'key': 'properties.retention', 'type': 'str'}, + 'submitted_at': {'key': 'properties.submittedAt', 'type': 'iso-8601'}, + 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, + 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, + 'output': {'key': 'properties.output', 'type': '[str]'}, + 'named_outputs': {'key': 'properties.namedOutputs', 'type': '{object}'}, + 'information': {'key': 'properties.information', 'type': '[str]'}, + 'warnings': {'key': 'properties.warnings', 'type': '[str]'}, + 'errors': {'key': 'properties.errors', 'type': '[str]'}, } def __init__( self, **kwargs ): - super(WorkloadNetworkDhcp, self).__init__(**kwargs) - self.dhcp_type = None # type: Optional[str] - self.display_name = kwargs.get('display_name', None) - self.segments = None + super(ScriptExecution, self).__init__(**kwargs) + self.script_cmdlet_id = kwargs.get('script_cmdlet_id', None) + self.parameters = kwargs.get('parameters', None) + self.hidden_parameters = kwargs.get('hidden_parameters', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.timeout = kwargs.get('timeout', None) + self.retention = kwargs.get('retention', None) + self.submitted_at = None + self.started_at = None + self.finished_at = None self.provisioning_state = None - self.revision = kwargs.get('revision', None) + self.output = kwargs.get('output', None) + self.named_outputs = kwargs.get('named_outputs', None) + self.information = None + self.warnings = None + self.errors = None + + +class ScriptExecutionsList(msrest.serialization.Model): + """Pageable list of script executions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of scripts. + :vartype value: list[~avs_client.models.ScriptExecution] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptExecution]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptExecutionsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptPackage(ProxyResource): + """Script Package resources available for execution. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar description: User friendly description of the package. + :vartype description: str + :ivar version: Module version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptPackage, self).__init__(**kwargs) + self.description = None + self.version = None + + +class ScriptPackagesList(msrest.serialization.Model): + """A list of the available script packages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of script package resources. + :vartype value: list[~avs_client.models.ScriptPackage] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptPackage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptPackagesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptParameter(msrest.serialization.Model): + """An parameter that the script will accept. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of parameter the script is expecting. psCredential is a + PSCredentialObject. Possible values include: "String", "SecureString", "Credential", "Int", + "Bool", "Float". + :vartype type: str or ~avs_client.models.ScriptParameterTypes + :param name: The parameter name that the script will expect a parameter value for. + :type name: str + :ivar description: User friendly description of the parameter. + :vartype description: str + :ivar visibility: Should this parameter be visible to arm and passed in the parameters argument + when executing. Possible values include: "Visible", "Hidden". + :vartype visibility: str or ~avs_client.models.VisibilityParameterEnum + :ivar optional: Is this parameter required or optional. Possible values include: "Optional", + "Required". + :vartype optional: str or ~avs_client.models.OptionalParamEnum + """ + + _validation = { + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'visibility': {'readonly': True}, + 'optional': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'optional': {'key': 'optional', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptParameter, self).__init__(**kwargs) + self.type = None + self.name = kwargs.get('name', None) + self.description = None + self.visibility = None + self.optional = None + + +class ScriptSecureStringExecutionParameter(ScriptExecutionParameter): + """a plain text value execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param secure_value: A secure value for the passed parameter, not to be stored in logs. + :type secure_value: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'secure_value': {'key': 'secureValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptSecureStringExecutionParameter, self).__init__(**kwargs) + self.type = 'SecureValue' # type: str + self.secure_value = kwargs.get('secure_value', None) + + +class ScriptStringExecutionParameter(ScriptExecutionParameter): + """a plain text value execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param value: The value for the passed parameter. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptStringExecutionParameter, self).__init__(**kwargs) + self.type = 'Value' # type: str + self.value = kwargs.get('value', None) + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: list[~avs_client.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure Monitoring. + :type metric_specifications: list[~avs_client.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class Trial(msrest.serialization.Model): + """Subscription trial availability. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", + "TrialDisabled". + :vartype status: str or ~avs_client.models.TrialStatus + :ivar available_hosts: Number of trial hosts available. + :vartype available_hosts: int + """ + + _validation = { + 'status': {'readonly': True}, + 'available_hosts': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Trial, self).__init__(**kwargs) + self.status = None + self.available_hosts = None + + +class WorkloadNetworkDhcp(ProxyResource): + """NSX DHCP. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadNetworkDhcpEntity'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkloadNetworkDhcp, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) class WorkloadNetworkDhcpEntity(msrest.serialization.Model): @@ -1841,7 +2460,7 @@ class WorkloadNetworkDhcpEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -1922,7 +2541,7 @@ class WorkloadNetworkDhcpRelay(WorkloadNetworkDhcpEntity): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -1970,7 +2589,7 @@ class WorkloadNetworkDhcpServer(WorkloadNetworkDhcpEntity): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -2013,7 +2632,7 @@ def __init__( self.lease_time = kwargs.get('lease_time', None) -class WorkloadNetworkDnsService(Resource): +class WorkloadNetworkDnsService(ProxyResource): """NSX DNS Service. Variables are only populated by the server, and will be ignored when sending a request. @@ -2112,7 +2731,7 @@ def __init__( self.next_link = None -class WorkloadNetworkDnsZone(Resource): +class WorkloadNetworkDnsZone(ProxyResource): """NSX DNS Zone. Variables are only populated by the server, and will be ignored when sending a request. @@ -2204,7 +2823,7 @@ def __init__( self.next_link = None -class WorkloadNetworkGateway(Resource): +class WorkloadNetworkGateway(ProxyResource): """NSX Gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -2275,7 +2894,7 @@ def __init__( self.next_link = None -class WorkloadNetworkPortMirroring(Resource): +class WorkloadNetworkPortMirroring(ProxyResource): """NSX Port Mirroring. Variables are only populated by the server, and will be ignored when sending a request. @@ -2370,7 +2989,88 @@ def __init__( self.next_link = None -class WorkloadNetworkSegment(Resource): +class WorkloadNetworkPublicIP(ProxyResource): + """NSX Public IP Block. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: Display name of the Public IP Block. + :type display_name: str + :param number_of_public_i_ps: Number of Public IPs requested. + :type number_of_public_i_ps: long + :ivar public_ip_block: CIDR Block of the Public IP Block. + :vartype public_ip_block: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkPublicIPProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'public_ip_block': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'number_of_public_i_ps': {'key': 'properties.numberOfPublicIPs', 'type': 'long'}, + 'public_ip_block': {'key': 'properties.publicIPBlock', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkloadNetworkPublicIP, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.number_of_public_i_ps = kwargs.get('number_of_public_i_ps', None) + self.public_ip_block = None + self.provisioning_state = None + + +class WorkloadNetworkPublicIPsList(msrest.serialization.Model): + """A list of NSX Public IP Blocks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on the page. + :vartype value: list[~avs_client.models.WorkloadNetworkPublicIP] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkloadNetworkPublicIP]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkloadNetworkPublicIPsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class WorkloadNetworkSegment(ProxyResource): """NSX Segment. Variables are only populated by the server, and will be ignored when sending a request. @@ -2506,7 +3206,7 @@ def __init__( self.gateway_address = kwargs.get('gateway_address', None) -class WorkloadNetworkVirtualMachine(Resource): +class WorkloadNetworkVirtualMachine(ProxyResource): """NSX Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2577,7 +3277,7 @@ def __init__( self.next_link = None -class WorkloadNetworkVMGroup(Resource): +class WorkloadNetworkVMGroup(ProxyResource): """NSX VM Group. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py index 84228a7340c..2cd7ab4c787 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py @@ -1,10 +1,12 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union import msrest.serialization @@ -57,44 +59,114 @@ class Addon(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param properties: The properties of an addon resource. + :type properties: ~avs_client.models.AddonProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'license_key': {'key': 'properties.licenseKey', 'type': 'str'}, - 'addon_type': {'key': 'properties.addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AddonProperties'}, } def __init__( self, *, - license_key: Optional[str] = None, - addon_type: Optional[Union[str, "AddonType"]] = None, + properties: Optional["AddonProperties"] = None, **kwargs ): super(Addon, self).__init__(**kwargs) - self.license_key = license_key - self.addon_type = addon_type + self.properties = properties + + +class AddonProperties(msrest.serialization.Model): + """The properties of an addon. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddonHcxProperties, AddonSrmProperties, AddonVrProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". + :type addon_type: str or ~avs_client.models.AddonType + :ivar provisioning_state: The state of the addon provisioning. Possible values include: + "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + """ + + _validation = { + 'addon_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + _subtype_map = { + 'addon_type': {'HCX': 'AddonHcxProperties', 'SRM': 'AddonSrmProperties', 'VR': 'AddonVrProperties'} + } + + def __init__( + self, + **kwargs + ): + super(AddonProperties, self).__init__(**kwargs) + self.addon_type = None # type: Optional[str] self.provisioning_state = None +class AddonHcxProperties(AddonProperties): + """The properties of an HCX addon. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". + :type addon_type: str or ~avs_client.models.AddonType + :ivar provisioning_state: The state of the addon provisioning. Possible values include: + "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param offer: Required. The HCX offer, example VMware MaaS Cloud Provider (Enterprise). + :type offer: str + """ + + _validation = { + 'addon_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'offer': {'required': True}, + } + + _attribute_map = { + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__( + self, + *, + offer: str, + **kwargs + ): + super(AddonHcxProperties, self).__init__(**kwargs) + self.addon_type = 'HCX' # type: str + self.offer = offer + + class AddonList(msrest.serialization.Model): """A paged list of addons. @@ -125,98 +197,84 @@ def __init__( self.next_link = None -class AddonSrmProperties(msrest.serialization.Model): - """The properties of an SRM addon that may be updated. - - :param license_key: The SRM license. - :type license_key: str - """ - - _attribute_map = { - 'license_key': {'key': 'licenseKey', 'type': 'str'}, - } - - def __init__( - self, - *, - license_key: Optional[str] = None, - **kwargs - ): - super(AddonSrmProperties, self).__init__(**kwargs) - self.license_key = license_key - - -class AddonProperties(AddonSrmProperties): - """The properties of an addon that may be updated. +class AddonSrmProperties(AddonProperties): + """The properties of a Site Recovery Manager (SRM) addon. Variables are only populated by the server, and will be ignored when sending a request. - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". :type addon_type: str or ~avs_client.models.AddonType :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param license_key: Required. The Site Recovery Manager (SRM) license. + :type license_key: str """ _validation = { + 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'license_key': {'required': True}, } _attribute_map = { - 'license_key': {'key': 'licenseKey', 'type': 'str'}, 'addon_type': {'key': 'addonType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'license_key': {'key': 'licenseKey', 'type': 'str'}, } def __init__( self, *, - license_key: Optional[str] = None, - addon_type: Optional[Union[str, "AddonType"]] = None, + license_key: str, **kwargs ): - super(AddonProperties, self).__init__(license_key=license_key, **kwargs) - self.addon_type = addon_type - self.provisioning_state = None + super(AddonSrmProperties, self).__init__(**kwargs) + self.addon_type = 'SRM' # type: str + self.license_key = license_key -class AddonUpdate(msrest.serialization.Model): - """An update of an addon resource. +class AddonVrProperties(AddonProperties): + """The properties of a vSphere Replication (VR) addon. Variables are only populated by the server, and will be ignored when sending a request. - :param license_key: The SRM license. - :type license_key: str - :param addon_type: The type of private cloud addon. Possible values include: "SRM", "VR". + All required parameters must be populated in order to send to Azure. + + :param addon_type: Required. The type of private cloud addon.Constant filled by server. + Possible values include: "SRM", "VR", "HCX". :type addon_type: str or ~avs_client.models.AddonType :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState + :param vrs_count: Required. The vSphere Replication Server (VRS) count. + :type vrs_count: int """ _validation = { + 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'vrs_count': {'required': True}, } _attribute_map = { - 'license_key': {'key': 'properties.properties.licenseKey', 'type': 'str'}, - 'addon_type': {'key': 'properties.properties.addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.properties.provisioningState', 'type': 'str'}, + 'addon_type': {'key': 'addonType', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vrs_count': {'key': 'vrsCount', 'type': 'int'}, } def __init__( self, *, - license_key: Optional[str] = None, - addon_type: Optional[Union[str, "AddonType"]] = None, + vrs_count: int, **kwargs ): - super(AddonUpdate, self).__init__(**kwargs) - self.license_key = license_key - self.addon_type = addon_type - self.provisioning_state = None + super(AddonVrProperties, self).__init__(**kwargs) + self.addon_type = 'VR' # type: str + self.vrs_count = vrs_count class AdminCredentials(msrest.serialization.Model): @@ -299,6 +357,80 @@ def __init__( self.express_route_private_peering_id = None +class CloudLink(Resource): + """A cloud link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar status: The state of the cloud link. Possible values include: "Active", "Building", + "Deleting", "Failed", "Disconnected". + :vartype status: str or ~avs_client.models.CloudLinkStatus + :param linked_cloud: Identifier of the other private cloud participating in the link. + :type linked_cloud: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'linked_cloud': {'key': 'properties.linkedCloud', 'type': 'str'}, + } + + def __init__( + self, + *, + linked_cloud: Optional[str] = None, + **kwargs + ): + super(CloudLink, self).__init__(**kwargs) + self.status = None + self.linked_cloud = linked_cloud + + +class CloudLinkList(msrest.serialization.Model): + """A paged list of cloud links. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on a page. + :vartype value: list[~avs_client.models.CloudLink] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CloudLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudLinkList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Cluster(Resource): """A cluster resource. @@ -504,7 +636,7 @@ class Datastore(Resource): :ivar type: Resource type. :vartype type: str :ivar provisioning_state: The state of the datastore provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating". + "Succeeded", "Failed", "Cancelled", "Pending", "Creating", "Updating", "Deleting". :vartype provisioning_state: str or ~avs_client.models.DatastoreProvisioningState :param net_app_volume: An Azure NetApp Files volume. :type net_app_volume: ~avs_client.models.NetAppVolume @@ -574,27 +706,47 @@ def __init__( class DiskPoolVolume(msrest.serialization.Model): """An iSCSI volume from Microsoft.StoragePool provider. - :param endpoints: iSCSI provider target IP address list. - :type endpoints: list[str] - :param lun_name: Name of the LUN to be used. + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param target_id: Required. Azure resource ID of the iSCSI target. + :type target_id: str + :param lun_name: Required. Name of the LUN to be used for datastore. :type lun_name: str + :param mount_option: Mode that describes whether the LUN has to be mounted as a datastore or + attached as a LUN. Possible values include: "MOUNT", "ATTACH". Default value: "MOUNT". + :type mount_option: str or ~avs_client.models.MountOptionEnum + :ivar path: Device path. + :vartype path: str """ + _validation = { + 'target_id': {'required': True}, + 'lun_name': {'required': True}, + 'path': {'readonly': True}, + } + _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, 'lun_name': {'key': 'lunName', 'type': 'str'}, + 'mount_option': {'key': 'mountOption', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, } def __init__( self, *, - endpoints: Optional[List[str]] = None, - lun_name: Optional[str] = None, + target_id: str, + lun_name: str, + mount_option: Optional[Union[str, "MountOptionEnum"]] = "MOUNT", **kwargs ): super(DiskPoolVolume, self).__init__(**kwargs) - self.endpoints = endpoints + self.target_id = target_id self.lun_name = lun_name + self.mount_option = mount_option + self.path = None class Endpoints(msrest.serialization.Model): @@ -640,7 +792,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -1214,27 +1366,28 @@ def __init__( class NetAppVolume(msrest.serialization.Model): """An Azure NetApp Files volume from Microsoft.NetApp provider. - :param nfs_provider_ip: IP address of the NFS provider. - :type nfs_provider_ip: str - :param nfs_file_path: File path through which the NFS volume is exposed by the provider. - :type nfs_file_path: str + All required parameters must be populated in order to send to Azure. + + :param id: Required. Azure resource ID of the NetApp volume. + :type id: str """ + _validation = { + 'id': {'required': True}, + } + _attribute_map = { - 'nfs_provider_ip': {'key': 'nfsProviderIp', 'type': 'str'}, - 'nfs_file_path': {'key': 'nfsFilePath', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, *, - nfs_provider_ip: Optional[str] = None, - nfs_file_path: Optional[str] = None, + id: str, **kwargs ): super(NetAppVolume, self).__init__(**kwargs) - self.nfs_provider_ip = nfs_provider_ip - self.nfs_file_path = nfs_file_path + self.id = id class Operation(msrest.serialization.Model): @@ -1438,7 +1591,7 @@ class PrivateCloud(TrackedResource): :param sku: Required. The private cloud SKU. :type sku: ~avs_client.models.Sku :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1455,6 +1608,8 @@ class PrivateCloud(TrackedResource): as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. :type network_block: str + :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. + :vartype external_cloud_links: list[str] :ivar management_network: Network used to access vCenter Server and NSX-T Manager. :vartype management_network: str :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot @@ -1481,6 +1636,7 @@ class PrivateCloud(TrackedResource): 'sku': {'required': True}, 'provisioning_state': {'readonly': True}, 'endpoints': {'readonly': True}, + 'external_cloud_links': {'readonly': True}, 'management_network': {'readonly': True}, 'provisioning_network': {'readonly': True}, 'vmotion_network': {'readonly': True}, @@ -1495,13 +1651,14 @@ class PrivateCloud(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, 'network_block': {'key': 'properties.networkBlock', 'type': 'str'}, + 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, 'management_network': {'key': 'properties.managementNetwork', 'type': 'str'}, 'provisioning_network': {'key': 'properties.provisioningNetwork', 'type': 'str'}, 'vmotion_network': {'key': 'properties.vmotionNetwork', 'type': 'str'}, @@ -1517,7 +1674,7 @@ def __init__( sku: "Sku", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - management_cluster: Optional["CommonClusterProperties"] = None, + management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, circuit: Optional["Circuit"] = None, @@ -1535,6 +1692,7 @@ def __init__( self.circuit = circuit self.endpoints = None self.network_block = network_block + self.external_cloud_links = None self.management_network = None self.provisioning_network = None self.vmotion_network = None @@ -1578,7 +1736,7 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): """The properties of a private cloud resource that may be updated. :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1587,7 +1745,7 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): """ _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, } @@ -1595,7 +1753,7 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): def __init__( self, *, - management_cluster: Optional["CommonClusterProperties"] = None, + management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, **kwargs @@ -1614,7 +1772,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): All required parameters must be populated in order to send to Azure. :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1631,6 +1789,8 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. :type network_block: str + :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. + :vartype external_cloud_links: list[str] :ivar management_network: Network used to access vCenter Server and NSX-T Manager. :vartype management_network: str :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot @@ -1654,6 +1814,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'provisioning_state': {'readonly': True}, 'endpoints': {'readonly': True}, 'network_block': {'required': True}, + 'external_cloud_links': {'readonly': True}, 'management_network': {'readonly': True}, 'provisioning_network': {'readonly': True}, 'vmotion_network': {'readonly': True}, @@ -1662,13 +1823,14 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): } _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'circuit': {'key': 'circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, 'network_block': {'key': 'networkBlock', 'type': 'str'}, + 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, 'management_network': {'key': 'managementNetwork', 'type': 'str'}, 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, @@ -1682,7 +1844,7 @@ def __init__( self, *, network_block: str, - management_cluster: Optional["CommonClusterProperties"] = None, + management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, circuit: Optional["Circuit"] = None, @@ -1695,6 +1857,7 @@ def __init__( self.circuit = circuit self.endpoints = None self.network_block = network_block + self.external_cloud_links = None self.management_network = None self.provisioning_network = None self.vmotion_network = None @@ -1710,7 +1873,7 @@ class PrivateCloudUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.CommonClusterProperties + :type management_cluster: ~avs_client.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: "Enabled", "Disabled". Default value: "Disabled". :type internet: str or ~avs_client.models.InternetEnum @@ -1720,7 +1883,7 @@ class PrivateCloudUpdate(msrest.serialization.Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'CommonClusterProperties'}, + 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, } @@ -1729,7 +1892,7 @@ def __init__( self, *, tags: Optional[Dict[str, str]] = None, - management_cluster: Optional["CommonClusterProperties"] = None, + management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, **kwargs @@ -1773,109 +1936,607 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) -class Quota(msrest.serialization.Model): - """Subscription quotas. +class ScriptExecutionParameter(msrest.serialization.Model): + """The arguments passed in to the execution. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PSCredentialExecutionParameter, ScriptSecureStringExecutionParameter, ScriptStringExecutionParameter. - :ivar hosts_remaining: Remaining hosts quota by sku type. - :vartype hosts_remaining: dict[str, int] - :ivar quota_enabled: Host quota is active for current subscription. Possible values include: - "Enabled", "Disabled". - :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType """ _validation = { - 'hosts_remaining': {'readonly': True}, - 'quota_enabled': {'readonly': True}, + 'name': {'required': True}, + 'type': {'required': True}, } _attribute_map = { - 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, - 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__( - self, - **kwargs - ): - super(Quota, self).__init__(**kwargs) - self.hosts_remaining = None - self.quota_enabled = None - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~avs_client.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~avs_client.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + _subtype_map = { + 'type': {'Credential': 'PSCredentialExecutionParameter', 'SecureValue': 'ScriptSecureStringExecutionParameter', 'Value': 'ScriptStringExecutionParameter'} } def __init__( self, *, - log_specifications: Optional[List["LogSpecification"]] = None, - metric_specifications: Optional[List["MetricSpecification"]] = None, + name: str, **kwargs ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications - self.metric_specifications = metric_specifications + super(ScriptExecutionParameter, self).__init__(**kwargs) + self.name = name + self.type = None # type: Optional[str] -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. +class PSCredentialExecutionParameter(ScriptExecutionParameter): + """a powershell credential object. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. + :param name: Required. The parameter name. :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param username: username for login. + :type username: str + :param password: password for login. + :type password: str """ _validation = { 'name': {'required': True}, + 'type': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, } def __init__( self, *, name: str, + username: Optional[str] = None, + password: Optional[str] = None, **kwargs ): - super(Sku, self).__init__(**kwargs) - self.name = name + super(PSCredentialExecutionParameter, self).__init__(name=name, **kwargs) + self.type = 'Credential' # type: str + self.username = username + self.password = password -class Trial(msrest.serialization.Model): - """Subscription trial availability. +class Quota(msrest.serialization.Model): + """Subscription quotas. Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", - "TrialDisabled". - :vartype status: str or ~avs_client.models.TrialStatus - :ivar available_hosts: Number of trial hosts available. - :vartype available_hosts: int + :ivar hosts_remaining: Remaining hosts quota by sku type. + :vartype hosts_remaining: dict[str, int] + :ivar quota_enabled: Host quota is active for current subscription. Possible values include: + "Enabled", "Disabled". + :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled """ _validation = { - 'status': {'readonly': True}, - 'available_hosts': {'readonly': True}, + 'hosts_remaining': {'readonly': True}, + 'quota_enabled': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, + 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, + 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Quota, self).__init__(**kwargs) + self.hosts_remaining = None + self.quota_enabled = None + + +class ScriptCmdlet(ProxyResource): + """A cmdlet available for script execution. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the scripts functionality. + :vartype description: str + :ivar timeout: Recommended time limit for execution. + :vartype timeout: str + :ivar parameters: Parameters the script will accept. + :vartype parameters: list[~avs_client.models.ScriptParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'timeout': {'readonly': True}, + 'parameters': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'timeout': {'key': 'properties.timeout', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ScriptParameter]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptCmdlet, self).__init__(**kwargs) + self.description = None + self.timeout = None + self.parameters = None + + +class ScriptCmdletsList(msrest.serialization.Model): + """Pageable list of scripts/cmdlets. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of scripts. + :vartype value: list[~avs_client.models.ScriptCmdlet] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptCmdlet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptCmdletsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptExecution(ProxyResource): + """An instance of a script executed by a user - custom or AVS. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param script_cmdlet_id: A reference to the script cmdlet resource if user is running a AVS + script. + :type script_cmdlet_id: str + :param parameters: Parameters the script will accept. + :type parameters: list[~avs_client.models.ScriptExecutionParameter] + :param hidden_parameters: Parameters that will be hidden/not visible to ARM, such as passwords + and credentials. + :type hidden_parameters: list[~avs_client.models.ScriptExecutionParameter] + :param failure_reason: Error message if the script was able to run, but if the script itself + had errors or powershell threw an exception. + :type failure_reason: str + :param timeout: Time limit for execution. + :type timeout: str + :param retention: Time to live for the resource. If not provided, will be available for 60 + days. + :type retention: str + :ivar submitted_at: Time the script execution was submitted. + :vartype submitted_at: ~datetime.datetime + :ivar started_at: Time the script execution was started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: Time the script execution was finished. + :vartype finished_at: ~datetime.datetime + :ivar provisioning_state: The state of the script execution resource. Possible values include: + "Pending", "Running", "Succeeded", "Failed", "Cancelling", "Cancelled", "Deleting". + :vartype provisioning_state: str or ~avs_client.models.ScriptExecutionProvisioningState + :param output: Standard output stream from the powershell execution. + :type output: list[str] + :param named_outputs: User-defined dictionary. + :type named_outputs: dict[str, any] + :ivar information: Standard information out stream from the powershell execution. + :vartype information: list[str] + :ivar warnings: Standard warning out stream from the powershell execution. + :vartype warnings: list[str] + :ivar errors: Standard error output stream from the powershell execution. + :vartype errors: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'submitted_at': {'readonly': True}, + 'started_at': {'readonly': True}, + 'finished_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'information': {'readonly': True}, + 'warnings': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'script_cmdlet_id': {'key': 'properties.scriptCmdletId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ScriptExecutionParameter]'}, + 'hidden_parameters': {'key': 'properties.hiddenParameters', 'type': '[ScriptExecutionParameter]'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, + 'timeout': {'key': 'properties.timeout', 'type': 'str'}, + 'retention': {'key': 'properties.retention', 'type': 'str'}, + 'submitted_at': {'key': 'properties.submittedAt', 'type': 'iso-8601'}, + 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, + 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'output': {'key': 'properties.output', 'type': '[str]'}, + 'named_outputs': {'key': 'properties.namedOutputs', 'type': '{object}'}, + 'information': {'key': 'properties.information', 'type': '[str]'}, + 'warnings': {'key': 'properties.warnings', 'type': '[str]'}, + 'errors': {'key': 'properties.errors', 'type': '[str]'}, + } + + def __init__( + self, + *, + script_cmdlet_id: Optional[str] = None, + parameters: Optional[List["ScriptExecutionParameter"]] = None, + hidden_parameters: Optional[List["ScriptExecutionParameter"]] = None, + failure_reason: Optional[str] = None, + timeout: Optional[str] = None, + retention: Optional[str] = None, + output: Optional[List[str]] = None, + named_outputs: Optional[Dict[str, Any]] = None, + **kwargs + ): + super(ScriptExecution, self).__init__(**kwargs) + self.script_cmdlet_id = script_cmdlet_id + self.parameters = parameters + self.hidden_parameters = hidden_parameters + self.failure_reason = failure_reason + self.timeout = timeout + self.retention = retention + self.submitted_at = None + self.started_at = None + self.finished_at = None + self.provisioning_state = None + self.output = output + self.named_outputs = named_outputs + self.information = None + self.warnings = None + self.errors = None + + +class ScriptExecutionsList(msrest.serialization.Model): + """Pageable list of script executions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of scripts. + :vartype value: list[~avs_client.models.ScriptExecution] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptExecution]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptExecutionsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptPackage(ProxyResource): + """Script Package resources available for execution. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar description: User friendly description of the package. + :vartype description: str + :ivar version: Module version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptPackage, self).__init__(**kwargs) + self.description = None + self.version = None + + +class ScriptPackagesList(msrest.serialization.Model): + """A list of the available script packages. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of script package resources. + :vartype value: list[~avs_client.models.ScriptPackage] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScriptPackage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptPackagesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ScriptParameter(msrest.serialization.Model): + """An parameter that the script will accept. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of parameter the script is expecting. psCredential is a + PSCredentialObject. Possible values include: "String", "SecureString", "Credential", "Int", + "Bool", "Float". + :vartype type: str or ~avs_client.models.ScriptParameterTypes + :param name: The parameter name that the script will expect a parameter value for. + :type name: str + :ivar description: User friendly description of the parameter. + :vartype description: str + :ivar visibility: Should this parameter be visible to arm and passed in the parameters argument + when executing. Possible values include: "Visible", "Hidden". + :vartype visibility: str or ~avs_client.models.VisibilityParameterEnum + :ivar optional: Is this parameter required or optional. Possible values include: "Optional", + "Required". + :vartype optional: str or ~avs_client.models.OptionalParamEnum + """ + + _validation = { + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'visibility': {'readonly': True}, + 'optional': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'optional': {'key': 'optional', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(ScriptParameter, self).__init__(**kwargs) + self.type = None + self.name = name + self.description = None + self.visibility = None + self.optional = None + + +class ScriptSecureStringExecutionParameter(ScriptExecutionParameter): + """a plain text value execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param secure_value: A secure value for the passed parameter, not to be stored in logs. + :type secure_value: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'secure_value': {'key': 'secureValue', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + secure_value: Optional[str] = None, + **kwargs + ): + super(ScriptSecureStringExecutionParameter, self).__init__(name=name, **kwargs) + self.type = 'SecureValue' # type: str + self.secure_value = secure_value + + +class ScriptStringExecutionParameter(ScriptExecutionParameter): + """a plain text value execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The parameter name. + :type name: str + :param type: Required. The type of execution parameter.Constant filled by server. Possible + values include: "Value", "SecureValue", "Credential". + :type type: str or ~avs_client.models.ScriptExecutionParameterType + :param value: The value for the passed parameter. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: Optional[str] = None, + **kwargs + ): + super(ScriptStringExecutionParameter, self).__init__(name=name, **kwargs) + self.type = 'Value' # type: str + self.value = value + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: list[~avs_client.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure Monitoring. + :type metric_specifications: list[~avs_client.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["LogSpecification"]] = None, + metric_specifications: Optional[List["MetricSpecification"]] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + + +class Trial(msrest.serialization.Model): + """Subscription trial availability. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", + "TrialDisabled". + :vartype status: str or ~avs_client.models.TrialStatus + :ivar available_hosts: Number of trial hosts available. + :vartype available_hosts: int + """ + + _validation = { + 'status': {'readonly': True}, + 'available_hosts': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, } @@ -1888,7 +2549,7 @@ def __init__( self.available_hosts = None -class WorkloadNetworkDhcp(Resource): +class WorkloadNetworkDhcp(ProxyResource): """NSX DHCP. Variables are only populated by the server, and will be ignored when sending a request. @@ -1899,52 +2560,31 @@ class WorkloadNetworkDhcp(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param dhcp_type: Type of DHCP: SERVER or RELAY.Constant filled by server. Possible values - include: "SERVER, RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'dhcp_type': {'key': 'properties.dhcpType', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'segments': {'key': 'properties.segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, + 'properties': {'key': 'properties', 'type': 'WorkloadNetworkDhcpEntity'}, } def __init__( self, *, - display_name: Optional[str] = None, - revision: Optional[int] = None, + properties: Optional["WorkloadNetworkDhcpEntity"] = None, **kwargs ): super(WorkloadNetworkDhcp, self).__init__(**kwargs) - self.dhcp_type = None # type: Optional[str] - self.display_name = display_name - self.segments = None - self.provisioning_state = None - self.revision = revision + self.properties = properties class WorkloadNetworkDhcpEntity(msrest.serialization.Model): @@ -1958,7 +2598,7 @@ class WorkloadNetworkDhcpEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -2042,7 +2682,7 @@ class WorkloadNetworkDhcpRelay(WorkloadNetworkDhcpEntity): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -2094,7 +2734,7 @@ class WorkloadNetworkDhcpServer(WorkloadNetworkDhcpEntity): All required parameters must be populated in order to send to Azure. :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER, RELAY". + values include: "SERVER", "RELAY". :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum :param display_name: Display name of the DHCP entity. :type display_name: str @@ -2142,7 +2782,7 @@ def __init__( self.lease_time = lease_time -class WorkloadNetworkDnsService(Resource): +class WorkloadNetworkDnsService(ProxyResource): """NSX DNS Service. Variables are only populated by the server, and will be ignored when sending a request. @@ -2248,7 +2888,7 @@ def __init__( self.next_link = None -class WorkloadNetworkDnsZone(Resource): +class WorkloadNetworkDnsZone(ProxyResource): """NSX DNS Zone. Variables are only populated by the server, and will be ignored when sending a request. @@ -2347,7 +2987,7 @@ def __init__( self.next_link = None -class WorkloadNetworkGateway(Resource): +class WorkloadNetworkGateway(ProxyResource): """NSX Gateway. Variables are only populated by the server, and will be ignored when sending a request. @@ -2420,7 +3060,7 @@ def __init__( self.next_link = None -class WorkloadNetworkPortMirroring(Resource): +class WorkloadNetworkPortMirroring(ProxyResource): """NSX Port Mirroring. Variables are only populated by the server, and will be ignored when sending a request. @@ -2521,7 +3161,91 @@ def __init__( self.next_link = None -class WorkloadNetworkSegment(Resource): +class WorkloadNetworkPublicIP(ProxyResource): + """NSX Public IP Block. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: Display name of the Public IP Block. + :type display_name: str + :param number_of_public_i_ps: Number of Public IPs requested. + :type number_of_public_i_ps: long + :ivar public_ip_block: CIDR Block of the Public IP Block. + :vartype public_ip_block: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkPublicIPProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'public_ip_block': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'number_of_public_i_ps': {'key': 'properties.numberOfPublicIPs', 'type': 'long'}, + 'public_ip_block': {'key': 'properties.publicIPBlock', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + number_of_public_i_ps: Optional[int] = None, + **kwargs + ): + super(WorkloadNetworkPublicIP, self).__init__(**kwargs) + self.display_name = display_name + self.number_of_public_i_ps = number_of_public_i_ps + self.public_ip_block = None + self.provisioning_state = None + + +class WorkloadNetworkPublicIPsList(msrest.serialization.Model): + """A list of NSX Public IP Blocks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on the page. + :vartype value: list[~avs_client.models.WorkloadNetworkPublicIP] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkloadNetworkPublicIP]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkloadNetworkPublicIPsList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class WorkloadNetworkSegment(ProxyResource): """NSX Segment. Variables are only populated by the server, and will be ignored when sending a request. @@ -2667,7 +3391,7 @@ def __init__( self.gateway_address = gateway_address -class WorkloadNetworkVirtualMachine(Resource): +class WorkloadNetworkVirtualMachine(ProxyResource): """NSX Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2740,7 +3464,7 @@ def __init__( self.next_link = None -class WorkloadNetworkVMGroup(Resource): +class WorkloadNetworkVMGroup(ProxyResource): """NSX VM Group. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py index 15958be9f5c..1e3c208eb0f 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -13,7 +15,11 @@ from ._authorizations_operations import AuthorizationsOperations from ._global_reach_connections_operations import GlobalReachConnectionsOperations from ._workload_networks_operations import WorkloadNetworksOperations +from ._cloud_links_operations import CloudLinksOperations from ._addons_operations import AddonsOperations +from ._script_packages_operations import ScriptPackagesOperations +from ._script_cmdlets_operations import ScriptCmdletsOperations +from ._script_executions_operations import ScriptExecutionsOperations __all__ = [ 'Operations', @@ -25,5 +31,9 @@ 'AuthorizationsOperations', 'GlobalReachConnectionsOperations', 'WorkloadNetworksOperations', + 'CloudLinksOperations', 'AddonsOperations', + 'ScriptPackagesOperations', + 'ScriptCmdletsOperations', + 'ScriptExecutionsOperations', ] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py index aee01fd8dfe..30cec0806fc 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -70,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -192,7 +194,7 @@ def _create_or_update_initial( resource_group_name, # type: str private_cloud_name, # type: str addon_name, # type: str - addon, # type: "_models.Addon" + properties=None, # type: Optional["_models.AddonProperties"] **kwargs # type: Any ): # type: (...) -> "_models.Addon" @@ -201,7 +203,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _addon = _models.Addon(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +229,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(addon, 'Addon') + body_content = self._serialize.body(_addon, 'Addon') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -252,7 +256,7 @@ def begin_create_or_update( resource_group_name, # type: str private_cloud_name, # type: str addon_name, # type: str - addon, # type: "_models.Addon" + properties=None, # type: Optional["_models.AddonProperties"] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Addon"] @@ -266,12 +270,12 @@ def begin_create_or_update( :type private_cloud_name: str :param addon_name: Name of the addon for the private cloud. :type addon_name: str - :param addon: A addon in the private cloud. - :type addon: ~avs_client.models.Addon + :param properties: The properties of an addon resource. + :type properties: ~avs_client.models.AddonProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Addon or the result of cls(response) @@ -290,7 +294,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, addon_name=addon_name, - addon=addon, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -339,7 +343,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -393,8 +397,8 @@ def begin_delete( :type addon_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py index 02ec8e458ca..cc65b642af1 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -70,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -192,7 +194,6 @@ def _create_or_update_initial( resource_group_name, # type: str private_cloud_name, # type: str authorization_name, # type: str - authorization, # type: "_models.ExpressRouteAuthorization" **kwargs # type: Any ): # type: (...) -> "_models.ExpressRouteAuthorization" @@ -201,7 +202,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _authorization = _models.ExpressRouteAuthorization() + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +228,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization, 'ExpressRouteAuthorization') + body_content = self._serialize.body(_authorization, 'ExpressRouteAuthorization') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -252,7 +255,6 @@ def begin_create_or_update( resource_group_name, # type: str private_cloud_name, # type: str authorization_name, # type: str - authorization, # type: "_models.ExpressRouteAuthorization" **kwargs # type: Any ): # type: (...) -> LROPoller["_models.ExpressRouteAuthorization"] @@ -266,12 +268,10 @@ def begin_create_or_update( :type private_cloud_name: str :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. :type authorization_name: str - :param authorization: An ExpressRoute Circuit Authorization. - :type authorization: ~avs_client.models.ExpressRouteAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteAuthorization or the result of cls(response) @@ -290,7 +290,6 @@ def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, authorization_name=authorization_name, - authorization=authorization, cls=lambda x,y,z: x, **kwargs ) @@ -339,7 +338,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -393,8 +392,8 @@ def begin_delete( :type authorization_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py new file mode 100644 index 00000000000..da121ac6ebb --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py @@ -0,0 +1,450 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CloudLinksOperations(object): + """CloudLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CloudLinkList"] + """List cloud link in a private cloud. + + List cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CloudLinkList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.CloudLinkList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLinkList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CloudLinkList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cloud_link_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CloudLink" + """Get an cloud link by name in a private cloud. + + Get an cloud link by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CloudLink, or the result of cls(response) + :rtype: ~avs_client.models.CloudLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cloud_link_name, # type: str + linked_cloud=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CloudLink" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _cloud_link = _models.CloudLink(linked_cloud=linked_cloud) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_cloud_link, 'CloudLink') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CloudLink', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cloud_link_name, # type: str + linked_cloud=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.CloudLink"] + """Create or update a cloud link in a private cloud. + + Create or update a cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: The name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :param linked_cloud: Identifier of the other private cloud participating in the link. + :type linked_cloud: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either CloudLink or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~avs_client.models.CloudLink] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cloud_link_name=cloud_link_name, + linked_cloud=linked_cloud, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CloudLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cloud_link_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cloud_link_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a cloud link in a private cloud. + + Delete a cloud link in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cloud_link_name: Name of the cloud link resource. + :type cloud_link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cloud_link_name=cloud_link_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py index 8229bb5504a..503dbc52d10 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -70,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -192,7 +194,8 @@ def _create_or_update_initial( resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str - cluster, # type: "_models.Cluster" + sku, # type: "_models.Sku" + cluster_size=None, # type: Optional[int] **kwargs # type: Any ): # type: (...) -> "_models.Cluster" @@ -201,7 +204,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _cluster = _models.Cluster(sku=sku, cluster_size=cluster_size) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +230,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster, 'Cluster') + body_content = self._serialize.body(_cluster, 'Cluster') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -252,7 +257,8 @@ def begin_create_or_update( resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str - cluster, # type: "_models.Cluster" + sku, # type: "_models.Sku" + cluster_size=None, # type: Optional[int] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Cluster"] @@ -266,12 +272,14 @@ def begin_create_or_update( :type private_cloud_name: str :param cluster_name: Name of the cluster in the private cloud. :type cluster_name: str - :param cluster: A cluster in the private cloud. - :type cluster: ~avs_client.models.Cluster + :param sku: The cluster SKU. + :type sku: ~avs_client.models.Sku + :param cluster_size: The cluster size. + :type cluster_size: int :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Cluster or the result of cls(response) @@ -290,7 +298,8 @@ def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, - cluster=cluster, + sku=sku, + cluster_size=cluster_size, cls=lambda x,y,z: x, **kwargs ) @@ -331,7 +340,7 @@ def _update_initial( resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str - cluster_update, # type: "_models.ClusterUpdate" + cluster_size=None, # type: Optional[int] **kwargs # type: Any ): # type: (...) -> "_models.Cluster" @@ -340,7 +349,9 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _cluster_update = _models.ClusterUpdate(cluster_size=cluster_size) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -364,7 +375,7 @@ def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster_update, 'ClusterUpdate') + body_content = self._serialize.body(_cluster_update, 'ClusterUpdate') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -391,7 +402,7 @@ def begin_update( resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str - cluster_update, # type: "_models.ClusterUpdate" + cluster_size=None, # type: Optional[int] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Cluster"] @@ -405,12 +416,12 @@ def begin_update( :type private_cloud_name: str :param cluster_name: Name of the cluster in the private cloud. :type cluster_name: str - :param cluster_update: The cluster properties to be updated. - :type cluster_update: ~avs_client.models.ClusterUpdate + :param cluster_size: The cluster size. + :type cluster_size: int :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Cluster or the result of cls(response) @@ -429,7 +440,7 @@ def begin_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, - cluster_update=cluster_update, + cluster_size=cluster_size, cls=lambda x,y,z: x, **kwargs ) @@ -478,7 +489,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -532,8 +543,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py index 266e450702e..0a54cf9cfdc 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -53,9 +55,9 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.DatastoreList"] - """List cloud datastores in a private cloud. + """List datastores in a private cloud cluster. - List cloud datastores in a private cloud. + List datastores in a private cloud cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -73,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -157,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -195,13 +197,14 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - def _create_initial( + def _create_or_update_initial( self, resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str datastore_name, # type: str - datastore, # type: "_models.Datastore" + net_app_volume=None, # type: Optional["_models.NetAppVolume"] + disk_pool_volume=None, # type: Optional["_models.DiskPoolVolume"] **kwargs # type: Any ): # type: (...) -> "_models.Datastore" @@ -210,12 +213,14 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _datastore = _models.Datastore(net_app_volume=net_app_volume, disk_pool_volume=disk_pool_volume) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -235,7 +240,7 @@ def _create_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(datastore, 'Datastore') + body_content = self._serialize.body(_datastore, 'Datastore') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -255,21 +260,22 @@ def _create_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - def begin_create( + def begin_create_or_update( self, resource_group_name, # type: str private_cloud_name, # type: str cluster_name, # type: str datastore_name, # type: str - datastore, # type: "_models.Datastore" + net_app_volume=None, # type: Optional["_models.NetAppVolume"] + disk_pool_volume=None, # type: Optional["_models.DiskPoolVolume"] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Datastore"] - """Create a datastore in a private cloud cluster. + """Create or update a datastore in a private cloud cluster. - Create a datastore in a private cloud cluster. + Create or update a datastore in a private cloud cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -279,12 +285,14 @@ def begin_create( :type cluster_name: str :param datastore_name: Name of the datastore in the private cloud cluster. :type datastore_name: str - :param datastore: A datastore in a private cloud cluster. - :type datastore: ~avs_client.models.Datastore + :param net_app_volume: An Azure NetApp Files volume. + :type net_app_volume: ~avs_client.models.NetAppVolume + :param disk_pool_volume: An iSCSI volume. + :type disk_pool_volume: ~avs_client.models.DiskPoolVolume :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Datastore or the result of cls(response) @@ -299,12 +307,13 @@ def begin_create( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, cluster_name=cluster_name, datastore_name=datastore_name, - datastore=datastore, + net_app_volume=net_app_volume, + disk_pool_volume=disk_pool_volume, cls=lambda x,y,z: x, **kwargs ) @@ -339,7 +348,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore def _delete_initial( self, @@ -355,7 +364,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -413,8 +422,8 @@ def begin_delete( :type datastore_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py index 64ee3154f21..9a7d8d99f16 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -70,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -192,7 +194,8 @@ def _create_or_update_initial( resource_group_name, # type: str private_cloud_name, # type: str global_reach_connection_name, # type: str - global_reach_connection, # type: "_models.GlobalReachConnection" + authorization_key=None, # type: Optional[str] + peer_express_route_circuit=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.GlobalReachConnection" @@ -201,7 +204,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _global_reach_connection = _models.GlobalReachConnection(authorization_key=authorization_key, peer_express_route_circuit=peer_express_route_circuit) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +230,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(global_reach_connection, 'GlobalReachConnection') + body_content = self._serialize.body(_global_reach_connection, 'GlobalReachConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -252,7 +257,8 @@ def begin_create_or_update( resource_group_name, # type: str private_cloud_name, # type: str global_reach_connection_name, # type: str - global_reach_connection, # type: "_models.GlobalReachConnection" + authorization_key=None, # type: Optional[str] + peer_express_route_circuit=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.GlobalReachConnection"] @@ -266,12 +272,16 @@ def begin_create_or_update( :type private_cloud_name: str :param global_reach_connection_name: Name of the global reach connection in the private cloud. :type global_reach_connection_name: str - :param global_reach_connection: A global reach connection in the private cloud. - :type global_reach_connection: ~avs_client.models.GlobalReachConnection + :param authorization_key: Authorization key from the peer express route used for the global + reach connection. + :type authorization_key: str + :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the + global reach connection. + :type peer_express_route_circuit: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either GlobalReachConnection or the result of cls(response) @@ -290,7 +300,8 @@ def begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, global_reach_connection_name=global_reach_connection_name, - global_reach_connection=global_reach_connection, + authorization_key=authorization_key, + peer_express_route_circuit=peer_express_route_circuit, cls=lambda x,y,z: x, **kwargs ) @@ -339,7 +350,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -393,8 +404,8 @@ def begin_delete( :type global_reach_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py index c5285dae003..edf72a1838d 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -68,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +150,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -190,7 +192,6 @@ def create_or_update( resource_group_name, # type: str private_cloud_name, # type: str hcx_enterprise_site_name, # type: str - hcx_enterprise_site, # type: "_models.HcxEnterpriseSite" **kwargs # type: Any ): # type: (...) -> "_models.HcxEnterpriseSite" @@ -204,8 +205,6 @@ def create_or_update( :type private_cloud_name: str :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. :type hcx_enterprise_site_name: str - :param hcx_enterprise_site: The HCX Enterprise Site. - :type hcx_enterprise_site: ~avs_client.models.HcxEnterpriseSite :keyword callable cls: A custom type or function that will be passed the direct response :return: HcxEnterpriseSite, or the result of cls(response) :rtype: ~avs_client.models.HcxEnterpriseSite @@ -216,7 +215,9 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _hcx_enterprise_site = _models.HcxEnterpriseSite() + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +241,7 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(hcx_enterprise_site, 'HcxEnterpriseSite') + body_content = self._serialize.body(_hcx_enterprise_site, 'HcxEnterpriseSite') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -290,7 +291,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py index 34c148e61a7..4afc0da377f 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -62,7 +64,7 @@ def check_trial_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -117,7 +119,7 @@ def check_quota_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py index e7e19dd65cd..40c16c04d6e 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -60,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py index 43b8ce74ca0..c585b999ec1 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -67,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +139,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -212,7 +214,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -261,7 +263,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,8 +328,8 @@ def begin_create_or_update( :type private_cloud: ~avs_client.models.PrivateCloud :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateCloud or the result of cls(response) @@ -393,7 +395,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -458,8 +460,8 @@ def begin_update( :type private_cloud_update: ~avs_client.models.PrivateCloudUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateCloud or the result of cls(response) @@ -524,7 +526,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -574,8 +576,8 @@ def begin_delete( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -636,7 +638,7 @@ def _rotate_vcenter_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -686,8 +688,8 @@ def begin_rotate_vcenter_password( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -748,7 +750,7 @@ def _rotate_nsxt_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -798,8 +800,8 @@ def begin_rotate_nsxt_password( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -873,7 +875,7 @@ def list_admin_credentials( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py new file mode 100644 index 00000000000..1659acc8a58 --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py @@ -0,0 +1,194 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ScriptCmdletsOperations(object): + """ScriptCmdletsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_package_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ScriptCmdletsList"] + """Return script cmdlet resources available for a private cloud to create a script execution + resource on their Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptCmdletsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptCmdletsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdletsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptCmdletsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_package_name, # type: str + script_cmdlet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ScriptCmdlet" + """Return information about a script cmdlet resource in a specific package on a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :param script_cmdlet_name: Name of the script cmdlet resource in the script package in the + private cloud. + :type script_cmdlet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptCmdlet, or the result of cls(response) + :rtype: ~avs_client.models.ScriptCmdlet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdlet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + 'scriptCmdletName': self._serialize.url("script_cmdlet_name", script_cmdlet_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptCmdlet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py new file mode 100644 index 00000000000..2b7a50e39ea --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py @@ -0,0 +1,523 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ScriptExecutionsOperations(object): + """ScriptExecutionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ScriptExecutionsList"] + """Get an script execution resource by name in a private cloud. + + Get an script execution resource by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptExecutionsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptExecutionsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecutionsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptExecutionsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ScriptExecution" + """Get an script execution resource by name in a private cloud. + + Get an script execution resource by name in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptExecution, or the result of cls(response) + :rtype: ~avs_client.models.ScriptExecution + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + script_execution, # type: "_models.ScriptExecution" + **kwargs # type: Any + ): + # type: (...) -> "_models.ScriptExecution" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(script_execution, 'ScriptExecution') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + script_execution, # type: "_models.ScriptExecution" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ScriptExecution"] + """Create or update a script execution resource in a private cloud. + + Create or update a script execution resource in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: The name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :param script_execution: A script running in the private cloud. + :type script_execution: ~avs_client.models.ScriptExecution + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ScriptExecution or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~avs_client.models.ScriptExecution] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + script_execution_name=script_execution_name, + script_execution=script_execution, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Cancel a ScriptExecution in a private cloud. + + Cancel a ScriptExecution in a private cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + script_execution_name=script_execution_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore + + def get_execution_logs( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_execution_name, # type: str + script_output_stream_type=None, # type: Optional[List[Union[str, "_models.ScriptOutputStreamType"]]] + **kwargs # type: Any + ): + # type: (...) -> "_models.ScriptExecution" + """Return the logs for a script execution resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_execution_name: Name of the user-invoked script execution resource. + :type script_execution_name: str + :param script_output_stream_type: Name of the desired output stream to return. If not provided, + will return all. An empty array will return nothing. + :type script_output_stream_type: list[str or ~avs_client.models.ScriptOutputStreamType] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptExecution, or the result of cls(response) + :rtype: ~avs_client.models.ScriptExecution + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.get_execution_logs.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if script_output_stream_type is not None: + body_content = self._serialize.body(script_output_stream_type, '[str]') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptExecution', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_execution_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py new file mode 100644 index 00000000000..ae78334d8fa --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py @@ -0,0 +1,184 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ScriptPackagesOperations(object): + """ScriptPackagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~avs_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ScriptPackagesList"] + """Return script packages available for a private cloud to run on their Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptPackagesList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptPackagesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackagesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptPackagesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + script_package_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ScriptPackage" + """Return script package available to run on an Private Cloud. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param script_package_name: Name of the script package in the private cloud. + :type script_package_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ScriptPackage, or the result of cls(response) + :rtype: ~avs_client.models.ScriptPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ScriptPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py index bf799ad331d..5a94175b75e 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py +++ b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py @@ -1,6 +1,8 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING @@ -70,7 +72,7 @@ def list_segments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +152,7 @@ def get_segment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -201,7 +203,7 @@ def _create_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -270,8 +272,8 @@ def begin_create_segments( :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkSegment or the result of cls(response) @@ -340,7 +342,7 @@ def _update_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -407,8 +409,8 @@ def begin_update_segments( :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkSegment or the result of cls(response) @@ -476,7 +478,7 @@ def _delete_segment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -530,8 +532,8 @@ def begin_delete_segment( :type segment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -607,7 +609,7 @@ def list_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -687,7 +689,7 @@ def get_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -729,7 +731,7 @@ def _create_dhcp_initial( resource_group_name, # type: str private_cloud_name, # type: str dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" + properties=None, # type: Optional["_models.WorkloadNetworkDhcpEntity"] **kwargs # type: Any ): # type: (...) -> "_models.WorkloadNetworkDhcp" @@ -738,7 +740,9 @@ def _create_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _workload_network_dhcp = _models.WorkloadNetworkDhcp(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -762,7 +766,7 @@ def _create_dhcp_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') + body_content = self._serialize.body(_workload_network_dhcp, 'WorkloadNetworkDhcp') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -789,7 +793,7 @@ def begin_create_dhcp( resource_group_name, # type: str private_cloud_name, # type: str dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" + properties=None, # type: Optional["_models.WorkloadNetworkDhcpEntity"] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.WorkloadNetworkDhcp"] @@ -803,12 +807,12 @@ def begin_create_dhcp( :type private_cloud_name: str :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) @@ -827,7 +831,7 @@ def begin_create_dhcp( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -868,7 +872,7 @@ def _update_dhcp_initial( resource_group_name, # type: str private_cloud_name, # type: str dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" + properties=None, # type: Optional["_models.WorkloadNetworkDhcpEntity"] **kwargs # type: Any ): # type: (...) -> Optional["_models.WorkloadNetworkDhcp"] @@ -877,7 +881,9 @@ def _update_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + + _workload_network_dhcp = _models.WorkloadNetworkDhcp(properties=properties) + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -901,7 +907,7 @@ def _update_dhcp_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') + body_content = self._serialize.body(_workload_network_dhcp, 'WorkloadNetworkDhcp') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -926,7 +932,7 @@ def begin_update_dhcp( resource_group_name, # type: str private_cloud_name, # type: str dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" + properties=None, # type: Optional["_models.WorkloadNetworkDhcpEntity"] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.WorkloadNetworkDhcp"] @@ -940,12 +946,12 @@ def begin_update_dhcp( :type private_cloud_name: str :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp + :param properties: DHCP properties. + :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) @@ -964,7 +970,7 @@ def begin_update_dhcp( resource_group_name=resource_group_name, private_cloud_name=private_cloud_name, dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, + properties=properties, cls=lambda x,y,z: x, **kwargs ) @@ -1013,7 +1019,7 @@ def _delete_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1067,8 +1073,8 @@ def begin_delete_dhcp( :type dhcp_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1144,7 +1150,7 @@ def list_gateways( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1224,7 +1230,7 @@ def get_gateway( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1286,7 +1292,7 @@ def list_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1367,7 +1373,7 @@ def get_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1418,7 +1424,7 @@ def _create_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1488,8 +1494,8 @@ def begin_create_port_mirroring( :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) @@ -1558,7 +1564,7 @@ def _update_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1626,8 +1632,8 @@ def begin_update_port_mirroring( :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) @@ -1695,7 +1701,7 @@ def _delete_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1750,8 +1756,8 @@ def begin_delete_port_mirroring( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1827,7 +1833,7 @@ def list_vm_groups( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -1907,7 +1913,7 @@ def get_vm_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -1958,7 +1964,7 @@ def _create_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2027,8 +2033,8 @@ def begin_create_vm_group( :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) @@ -2097,7 +2103,7 @@ def _update_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2164,8 +2170,8 @@ def begin_update_vm_group( :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) @@ -2233,7 +2239,7 @@ def _delete_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2287,8 +2293,8 @@ def begin_delete_vm_group( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -2364,7 +2370,7 @@ def list_virtual_machines( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -2432,7 +2438,7 @@ def get_virtual_machine( :type resource_group_name: str :param private_cloud_name: Name of the private cloud. :type private_cloud_name: str - :param virtual_machine_id: NSX Virtual Machine identifier. + :param virtual_machine_id: Virtual Machine identifier. :type virtual_machine_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WorkloadNetworkVirtualMachine, or the result of cls(response) @@ -2444,7 +2450,7 @@ def get_virtual_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2506,7 +2512,7 @@ def list_dns_services( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -2587,7 +2593,7 @@ def get_dns_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2638,7 +2644,7 @@ def _create_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2708,8 +2714,8 @@ def begin_create_dns_service( :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) @@ -2778,7 +2784,7 @@ def _update_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2846,8 +2852,8 @@ def begin_update_dns_service( :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) @@ -2915,7 +2921,7 @@ def _delete_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -2970,8 +2976,8 @@ def begin_delete_dns_service( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -3047,7 +3053,7 @@ def list_dns_zones( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -3127,7 +3133,7 @@ def get_dns_zone( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -3178,7 +3184,7 @@ def _create_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3247,8 +3253,8 @@ def begin_create_dns_zone( :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) @@ -3317,7 +3323,7 @@ def _update_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3384,8 +3390,8 @@ def begin_update_dns_zone( :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) @@ -3453,7 +3459,7 @@ def _delete_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -3507,8 +3513,8 @@ def begin_delete_dns_zone( :type private_cloud_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -3558,3 +3564,413 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore + + def list_public_i_ps( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkloadNetworkPublicIPsList"] + """List of Public IP Blocks in a private cloud workload network. + + List of Public IP Blocks in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadNetworkPublicIPsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkPublicIPsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIPsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_i_ps.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WorkloadNetworkPublicIPsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_public_i_ps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs'} # type: ignore + + def get_public_ip( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + public_ip_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkloadNetworkPublicIP" + """Get a Public IP Block by id in a private cloud workload network. + + Get a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkloadNetworkPublicIP, or the result of cls(response) + :rtype: ~avs_client.models.WorkloadNetworkPublicIP + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get_public_ip.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + def _create_public_ip_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + public_ip_id, # type: str + display_name=None, # type: Optional[str] + number_of_public_i_ps=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkloadNetworkPublicIP" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _workload_network_public_ip = _models.WorkloadNetworkPublicIP(display_name=display_name, number_of_public_i_ps=number_of_public_i_ps) + api_version = "2021-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_public_ip_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_workload_network_public_ip, 'WorkloadNetworkPublicIP') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + def begin_create_public_ip( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + public_ip_id, # type: str + display_name=None, # type: Optional[str] + number_of_public_i_ps=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.WorkloadNetworkPublicIP"] + """Create a Public IP Block by id in a private cloud workload network. + + Create a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :param display_name: Display name of the Public IP Block. + :type display_name: str + :param number_of_public_i_ps: Number of Public IPs requested. + :type number_of_public_i_ps: long + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either WorkloadNetworkPublicIP or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkPublicIP] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_public_ip_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + public_ip_id=public_ip_id, + display_name=display_name, + number_of_public_i_ps=number_of_public_i_ps, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + def _delete_public_ip_initial( + self, + resource_group_name, # type: str + public_ip_id, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self._delete_public_ip_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore + + def begin_delete_public_ip( + self, + resource_group_name, # type: str + public_ip_id, # type: str + private_cloud_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a Public IP Block by id in a private cloud workload network. + + Delete a Public IP Block by id in a private cloud workload network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP + Block's display name. + :type public_ip_id: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_public_ip_initial( + resource_group_name=resource_group_name, + public_ip_id=public_ip_id, + private_cloud_name=private_cloud_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/setup.py b/src/vmware/azext_vmware/vendored_sdks/setup.py new file mode 100644 index 00000000000..6c48b1fd2db --- /dev/null +++ b/src/vmware/azext_vmware/vendored_sdks/setup.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# coding: utf-8 + +from setuptools import setup, find_packages + +NAME = "azure-mgmt-avs" +VERSION = "0.1.0" + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.8.2", "azure-mgmt-core<2.0.0,>=1.2.1"] + +setup( + name=NAME, + version=VERSION, + description="azure-mgmt-avs", + author_email="", + url="", + keywords=["Swagger", "AVSClient"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + Azure VMware Solution API. + """ +) From 8a8074c183e7befe47e2e2558fa56613237e2841 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 11:38:00 +0800 Subject: [PATCH 19/37] [Release] Update index.json for extension [ aks-preview ] (#3485) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=940681 Last commit: https://github.com/Azure/azure-cli-extensions/commit/93e9d255537cb29edd0636e4f2ee5cb75460b290 --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index a4cbb71948c..c2e73591110 100644 --- a/src/index.json +++ b/src/index.json @@ -3046,6 +3046,49 @@ "version": "0.5.17" }, "sha256Digest": "add861fdea86d7789a0680a3db61fbc32736849c137eb043cb4496f1ee07b742" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.18-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.18-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.18" + }, + "sha256Digest": "5cdb117cd30f743c092131bf77e8a699ba4e62bdf7f60a987b5e04387a57ccec" } ], "alertsmanagement": [ From 5853fbc4e157748778c67dde6a5a69cc7dfb813a Mon Sep 17 00:00:00 2001 From: "Kerwin(Kaihui) Sun" Date: Thu, 10 Jun 2021 15:50:43 +0800 Subject: [PATCH 20/37] [PowerBIDedicated] Migrate to track2 (#3354) --- src/powerbidedicated/HISTORY.rst | 5 + .../azext_powerbidedicated/_client_factory.py | 2 +- .../azext_powerbidedicated/custom.py | 6 +- ...st_powerbidedicated_embedded_capacity.yaml | 310 ++-- .../latest/test_powerbidedicated_scenario.py | 4 +- .../powerbidedicated/__init__.py | 20 +- .../powerbidedicated/_configuration.py | 83 +- .../powerbidedicated/_power_bi_dedicated.py | 75 + .../_power_bi_dedicated_management_client.py | 56 - .../{version.py => _version.py} | 10 +- .../powerbidedicated/aio/__init__.py | 10 + .../powerbidedicated/aio/_configuration.py | 67 + .../aio/_power_bi_dedicated.py | 69 + .../aio/operations/__init__.py | 15 + .../aio/operations/_capacities_operations.py | 1024 +++++++++++++ .../aio/operations/_operations.py | 105 ++ .../powerbidedicated/models/__init__.py | 63 +- .../powerbidedicated/models/_models.py | 350 +++-- .../powerbidedicated/models/_models_py3.py | 392 +++-- .../powerbidedicated/models/_paged_models.py | 40 - .../models/_power_bi_dedicated_enums.py | 69 + ...er_bi_dedicated_management_client_enums.py | 49 - .../powerbidedicated/operations/__init__.py | 7 +- .../operations/_capacities_operations.py | 1333 +++++++++-------- .../operations/_operations.py | 121 +- .../vendored_sdks/powerbidedicated/py.typed | 1 + src/powerbidedicated/setup.py | 2 +- 27 files changed, 3099 insertions(+), 1189 deletions(-) create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated.py delete mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated_management_client.py rename src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/{version.py => _version.py} (84%) create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/__init__.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_configuration.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_power_bi_dedicated.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/__init__.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_capacities_operations.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_operations.py delete mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_paged_models.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_enums.py delete mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_management_client_enums.py create mode 100644 src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/py.typed diff --git a/src/powerbidedicated/HISTORY.rst b/src/powerbidedicated/HISTORY.rst index 45241924d74..d3c237c036e 100644 --- a/src/powerbidedicated/HISTORY.rst +++ b/src/powerbidedicated/HISTORY.rst @@ -2,6 +2,11 @@ Release History =============== + +0.2.1 +++++++ +* Migrate to track2 SDK + 0.2.0 ++++++ * Make --administration-members required for `az powerbi embedded-capacity create`. diff --git a/src/powerbidedicated/azext_powerbidedicated/_client_factory.py b/src/powerbidedicated/azext_powerbidedicated/_client_factory.py index 1d3486c4214..251f7605858 100644 --- a/src/powerbidedicated/azext_powerbidedicated/_client_factory.py +++ b/src/powerbidedicated/azext_powerbidedicated/_client_factory.py @@ -6,7 +6,7 @@ def cf_powerbidedicated(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client - from .vendored_sdks.powerbidedicated import PowerBIDedicatedManagementClient + from .vendored_sdks.powerbidedicated import PowerBIDedicated as PowerBIDedicatedManagementClient return get_mgmt_service_client(cli_ctx, PowerBIDedicatedManagementClient) diff --git a/src/powerbidedicated/azext_powerbidedicated/custom.py b/src/powerbidedicated/azext_powerbidedicated/custom.py index 03333537528..41c6bc3b44e 100644 --- a/src/powerbidedicated/azext_powerbidedicated/custom.py +++ b/src/powerbidedicated/azext_powerbidedicated/custom.py @@ -25,7 +25,7 @@ def create_powerbi_embedded_capacity(client, body['tags'] = tags # dictionary body['location'] = location # dictionary body.setdefault('administration', {})['members'] = None if administration_members is None else administration_members - return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, dedicated_capacity_name=name, capacity_parameters=body) + return sdk_no_wait(no_wait, client.begin_create, resource_group_name=resource_group_name, dedicated_capacity_name=name, capacity_parameters=body) def update_powerbi_embedded_capacity(client, @@ -45,14 +45,14 @@ def update_powerbi_embedded_capacity(client, if administration_members is not None: body.setdefault('administration', {})['members'] = None if administration_members is None \ else administration_members - return sdk_no_wait(no_wait, client.update, resource_group_name=resource_group_name, dedicated_capacity_name=name, + return sdk_no_wait(no_wait, client.begin_update, resource_group_name=resource_group_name, dedicated_capacity_name=name, capacity_update_parameters=body) def delete_powerbi_embedded_capacity(client, resource_group_name, name, no_wait=False): - return sdk_no_wait(no_wait, client.delete, resource_group_name=resource_group_name, dedicated_capacity_name=name) + return sdk_no_wait(no_wait, client.begin_delete, resource_group_name=resource_group_name, dedicated_capacity_name=name) def get_powerbi_embedded_capacity(client, diff --git a/src/powerbidedicated/azext_powerbidedicated/tests/latest/recordings/test_powerbidedicated_embedded_capacity.yaml b/src/powerbidedicated/azext_powerbidedicated/tests/latest/recordings/test_powerbidedicated_embedded_capacity.yaml index 4c92dbef374..d020b465f70 100644 --- a/src/powerbidedicated/azext_powerbidedicated/tests/latest/recordings/test_powerbidedicated_embedded_capacity.yaml +++ b/src/powerbidedicated/azext_powerbidedicated/tests/latest/recordings/test_powerbidedicated_embedded_capacity.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "eastus", "sku": {"name": "A1", "tier": "PBIE_Azure"}, "properties": - {"administration": {"members": ["4759ce24-1955-4c57-bc53-357a69cc065f"]}}}' + {"administration": {"members": ["00000000-0000-0000-0000-000000000000"]}}}' headers: Accept: - application/json @@ -12,43 +12,38 @@ interactions: Connection: - keep-alive Content-Length: - - '156' + - '142' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --sku-name --location --sku-tier --administration-members --no-wait User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Provisioning","state":"Provisioning","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"eastus","sku":{"name":"A1","tier":"PBIE_Azure"}}' + string: '{"properties":{"provisioningState":"Provisioning","state":"Provisioning","administration":{"members":["00000000-0000-0000-0000-000000000000"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"eastus","sku":{"name":"A1","tier":"PBIE_Azure"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/B912647A-E910-42C9-8873-3160500F354D?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/77E6CA68-F3B8-4634-9027-13A050AD1396?api-version=2017-01-01-preview cache-control: - no-cache content-length: - - '508' + - '494' content-security-policy: - script-src 'self' content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:03 GMT + - Mon, 10 May 2021 06:06:20 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/B912647A-E910-42C9-8873-3160500F354D?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/77E6CA68-F3B8-4634-9027-13A050AD1396?api-version=2017-01-01-preview pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -56,9 +51,9 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:58:58 PM + - 5/10/2021 6:06:08 AM x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' x-xss-protection: - 1; mode=block status: @@ -78,15 +73,12 @@ interactions: ParameterSetName: - --resource-group --name --created User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Provisioning","state":"Provisioning","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Provisioning","state":"Provisioning","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A1","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: cache-control: @@ -98,13 +90,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:05 GMT + - Mon, 10 May 2021 06:06:23 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -116,7 +106,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:59:05 PM + - 5/10/2021 6:06:22 AM x-xss-protection: - 1; mode=block status: @@ -136,15 +126,65 @@ interactions: ParameterSetName: - --resource-group --name --created User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Provisioning","state":"Provisioning","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + US","sku":{"name":"A1","tier":"PBIE_Azure","capacity":1},"tags":{}}' + headers: + cache-control: + - no-cache + content-length: + - '532' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 10 May 2021 06:06:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-frame-options: + - deny + x-ms-current-utc-date: + - 5/10/2021 6:06:53 AM + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - powerbi embedded-capacity wait + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --created + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A1","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: cache-control: @@ -156,13 +196,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:35 GMT + - Mon, 10 May 2021 06:07:23 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -174,7 +212,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:59:36 PM + - 5/10/2021 6:07:24 AM x-xss-protection: - 1; mode=block status: @@ -194,15 +232,12 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities?api-version=2017-10-01 response: body: - string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"value":[{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A1","tier":"PBIE_Azure","capacity":1},"tags":{}}]}' headers: cache-control: @@ -214,13 +249,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:38 GMT + - Mon, 10 May 2021 06:07:26 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -232,7 +265,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:59:37 PM + - 5/10/2021 6:07:26 AM x-xss-protection: - 1; mode=block status: @@ -252,15 +285,12 @@ interactions: ParameterSetName: - -g --name User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A1","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: cache-control: @@ -272,13 +302,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:39 GMT + - Mon, 10 May 2021 06:07:28 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -290,7 +318,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:59:40 PM + - 5/10/2021 6:07:28 AM x-xss-protection: - 1; mode=block status: @@ -310,41 +338,36 @@ interactions: Content-Length: - '23' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --sku-name User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Preparing","state":"Preparing","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Preparing","state":"Preparing","administration":{"members":["00000000-0000-0000-0000-000000000000"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A2","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/DA46458B-FD20-4452-A1EA-4B307A23339E?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220?api-version=2017-01-01-preview cache-control: - no-cache content-length: - - '526' + - '512' content-security-policy: - script-src 'self' content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 14:59:44 GMT + - Mon, 10 May 2021 06:07:33 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/DA46458B-FD20-4452-A1EA-4B307A23339E?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/0BA08E09-BE7B-4301-885F-A851F2B0C220?api-version=2017-01-01-preview pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -352,9 +375,9 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 2:59:43 PM + - 5/10/2021 6:07:33 AM x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' x-xss-protection: - 1; mode=block status: @@ -364,7 +387,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -374,13 +397,12 @@ interactions: ParameterSetName: - --resource-group --name --sku-name User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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.PowerBIDedicated/locations/eastus/operationstatuses/DA46458B-FD20-4452-A1EA-4B307A23339E?api-version=2017-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220?api-version=2017-01-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/DA46458B-FD20-4452-A1EA-4B307A23339E","name":"DA46458B-FD20-4452-A1EA-4B307A23339E","status":"Scaling","startTime":"2020-03-05T14:59:43.8930000Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220","name":"0BA08E09-BE7B-4301-885F-A851F2B0C220","status":"Scaling","startTime":"2021-05-10T06:07:33.7630000Z"}' headers: cache-control: - no-cache @@ -391,13 +413,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:00:16 GMT + - Mon, 10 May 2021 06:08:04 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -409,7 +429,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:00:15 PM + - 5/10/2021 6:08:04 AM x-xss-protection: - 1; mode=block status: @@ -419,7 +439,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -429,13 +449,64 @@ interactions: ParameterSetName: - --resource-group --name --sku-name User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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.PowerBIDedicated/locations/eastus/operationstatuses/DA46458B-FD20-4452-A1EA-4B307A23339E?api-version=2017-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220?api-version=2017-01-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/DA46458B-FD20-4452-A1EA-4B307A23339E","name":"DA46458B-FD20-4452-A1EA-4B307A23339E","status":"Succeeded","startTime":"2020-03-05T14:59:43.8930000Z","endTime":"2020-03-05T15:00:35.3170000Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220","name":"0BA08E09-BE7B-4301-885F-A851F2B0C220","status":"Scaling","startTime":"2021-05-10T06:07:33.7630000Z"}' + headers: + cache-control: + - no-cache + content-length: + - '240' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 10 May 2021 06:08:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-frame-options: + - deny + x-ms-current-utc-date: + - 5/10/2021 6:08:35 AM + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - powerbi embedded-capacity update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --sku-name + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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.PowerBIDedicated/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220?api-version=2017-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/0BA08E09-BE7B-4301-885F-A851F2B0C220","name":"0BA08E09-BE7B-4301-885F-A851F2B0C220","status":"Succeeded","startTime":"2021-05-10T06:07:33.7630000Z","endTime":"2021-05-10T06:08:43.0330000Z"}' headers: cache-control: - no-cache @@ -446,13 +517,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:00:46 GMT + - Mon, 10 May 2021 06:09:05 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -464,7 +533,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:00:46 PM + - 5/10/2021 6:09:05 AM x-xss-protection: - 1; mode=block status: @@ -474,7 +543,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -484,13 +553,12 @@ interactions: ParameterSetName: - --resource-group --name --sku-name User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A2","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: cache-control: @@ -502,13 +570,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:00:46 GMT + - Mon, 10 May 2021 06:09:05 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -520,7 +586,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:00:46 PM + - 5/10/2021 6:09:05 AM x-xss-protection: - 1; mode=block status: @@ -540,15 +606,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["4759ce24-1955-4c57-bc53-357a69cc065f"]}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East + string: '{"properties":{"provisioningState":"Succeeded","state":"Succeeded","administration":{"members":["00000000-0000-0000-0000-000000000000"]},"mode":"Gen1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002","name":"clipowerbi000002","type":"Microsoft.PowerBIDedicated/capacities","location":"East US","sku":{"name":"A2","tier":"PBIE_Azure","capacity":1},"tags":{}}' headers: cache-control: @@ -560,13 +623,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:00:49 GMT + - Mon, 10 May 2021 06:09:08 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -578,7 +639,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:00:49 PM + - 5/10/2021 6:09:08 AM x-xss-protection: - 1; mode=block status: @@ -600,10 +661,7 @@ interactions: ParameterSetName: - -g -n -y User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities/clipowerbi000002?api-version=2017-10-01 response: @@ -611,7 +669,7 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/4F912BF1-3846-472D-9F75-6B5E38918692?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/C7D10472-8DAB-4F76-B915-00F2E8695873?api-version=2017-01-01-preview cache-control: - no-cache content-length: @@ -619,15 +677,13 @@ interactions: content-security-policy: - script-src 'self' date: - - Thu, 05 Mar 2020 15:00:51 GMT + - Mon, 10 May 2021 06:09:14 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/4F912BF1-3846-472D-9F75-6B5E38918692?api-version=2017-01-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationresults/C7D10472-8DAB-4F76-B915-00F2E8695873?api-version=2017-01-01-preview pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -635,7 +691,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:00:51 PM + - 5/10/2021 6:09:13 AM x-ms-ratelimit-remaining-subscription-deletes: - '14999' x-xss-protection: @@ -647,7 +703,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -657,13 +713,12 @@ interactions: ParameterSetName: - -g -n -y User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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.PowerBIDedicated/locations/eastus/operationstatuses/4F912BF1-3846-472D-9F75-6B5E38918692?api-version=2017-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PowerBIDedicated/locations/eastus/operationstatuses/C7D10472-8DAB-4F76-B915-00F2E8695873?api-version=2017-01-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/4F912BF1-3846-472D-9F75-6B5E38918692","name":"4F912BF1-3846-472D-9F75-6B5E38918692","status":"Succeeded","startTime":"2020-03-05T15:00:51.3930000Z","endTime":"2020-03-05T15:01:01.5200000Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationstatuses/C7D10472-8DAB-4F76-B915-00F2E8695873","name":"C7D10472-8DAB-4F76-B915-00F2E8695873","status":"Succeeded","startTime":"2021-05-10T06:09:13.6030000Z","endTime":"2021-05-10T06:09:31.8700000Z"}' headers: cache-control: - no-cache @@ -674,13 +729,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:01:23 GMT + - Mon, 10 May 2021 06:09:44 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -692,7 +745,7 @@ interactions: x-frame-options: - deny x-ms-current-utc-date: - - 3/5/2020 3:01:23 PM + - 5/10/2021 6:09:44 AM x-xss-protection: - 1; mode=block status: @@ -712,10 +765,7 @@ interactions: ParameterSetName: - -g User-Agent: - - python/3.7.4 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.2 - azure-mgmt-powerbidedicated/0.1.0 Azure-SDK-For-Python AZURECLI/2.1.0 - accept-language: - - en-US + - AZURECLI/2.23.0 azsdk-python-mgmt-powerbidedicated/2.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/cli_test_powerbidedicated000001/providers/Microsoft.PowerBIDedicated/capacities?api-version=2017-10-01 response: @@ -726,20 +776,30 @@ interactions: - no-cache content-length: - '12' + content-security-policy: + - script-src 'self' content-type: - application/json; charset=utf-8 date: - - Thu, 05 Mar 2020 15:01:24 GMT + - Mon, 10 May 2021 06:09:47 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked vary: - Accept-Encoding x-content-type-options: - nosniff + x-frame-options: + - deny + x-ms-current-utc-date: + - 5/10/2021 6:09:47 AM + x-xss-protection: + - 1; mode=block status: code: 200 message: OK diff --git a/src/powerbidedicated/azext_powerbidedicated/tests/latest/test_powerbidedicated_scenario.py b/src/powerbidedicated/azext_powerbidedicated/tests/latest/test_powerbidedicated_scenario.py index a3c58a75f6c..075d5107c75 100644 --- a/src/powerbidedicated/azext_powerbidedicated/tests/latest/test_powerbidedicated_scenario.py +++ b/src/powerbidedicated/azext_powerbidedicated/tests/latest/test_powerbidedicated_scenario.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +import os import time from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, record_only) @@ -12,7 +13,8 @@ class PowerBIDedicatedScenarioTest(ScenarioTest): def test_powerbidedicated_embedded_capacity(self, resource_group): self.kwargs.update({ 'name': self.create_random_name(prefix='clipowerbi', length=24), - 'administrator': "4759ce24-1955-4c57-bc53-357a69cc065f", + # 'administrator': "4759ce24-1955-4c57-bc53-357a69cc065f", + 'administrator': os.environ.get('USER_PRINCIPAL_NAME') if self.is_live else '00000000-0000-0000-0000-000000000000', 'location': "eastus" }) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/__init__.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/__init__.py index 58aae601497..85242d08610 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/__init__.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/__init__.py @@ -1,19 +1,19 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import PowerBIDedicatedManagementClientConfiguration -from ._power_bi_dedicated_management_client import PowerBIDedicatedManagementClient -__all__ = ['PowerBIDedicatedManagementClient', 'PowerBIDedicatedManagementClientConfiguration'] - -from .version import VERSION +from ._power_bi_dedicated import PowerBIDedicated +from ._version import VERSION __version__ = VERSION +__all__ = ['PowerBIDedicated'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_configuration.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_configuration.py index fd89838b4fa..ae7c52ffecd 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_configuration.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_configuration.py @@ -1,50 +1,71 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class PowerBIDedicatedConfiguration(Configuration): + """Configuration for PowerBIDedicated. -class PowerBIDedicatedManagementClientConfiguration(AzureConfiguration): - """Configuration for PowerBIDedicatedManagementClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: A unique identifier for a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service - call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(PowerBIDedicatedManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True + super(PowerBIDedicatedConfiguration, self).__init__(**kwargs) - self.add_user_agent('azure-mgmt-powerbidedicated/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.api_version = "2017-10-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-powerbidedicated/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated.py new file mode 100644 index 00000000000..93b6367f6a9 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import PowerBIDedicatedConfiguration +from .operations import CapacitiesOperations +from .operations import Operations +from . import models + + +class PowerBIDedicated(object): + """PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. + + :ivar capacities: CapacitiesOperations operations + :vartype capacities: azure.mgmt.powerbidedicated.operations.CapacitiesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.powerbidedicated.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = PowerBIDedicatedConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.capacities = CapacitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> PowerBIDedicated + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated_management_client.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated_management_client.py deleted file mode 100644 index e797cd8731d..00000000000 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_power_bi_dedicated_management_client.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import PowerBIDedicatedManagementClientConfiguration -from .operations import CapacitiesOperations -from .operations import Operations -from . import models - - -class PowerBIDedicatedManagementClient(SDKClient): - """PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities - - :ivar config: Configuration for client. - :vartype config: PowerBIDedicatedManagementClientConfiguration - - :ivar capacities: Capacities operations - :vartype capacities: azure.mgmt.powerbidedicated.operations.CapacitiesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.powerbidedicated.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: A unique identifier for a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service - call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = PowerBIDedicatedManagementClientConfiguration(credentials, subscription_id, base_url) - super(PowerBIDedicatedManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.capacities = CapacitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/version.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_version.py similarity index 84% rename from src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/version.py rename to src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_version.py index e0ec669828c..48944bf3938 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/version.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/_version.py @@ -1,13 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" - +VERSION = "2.0.0" diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/__init__.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/__init__.py new file mode 100644 index 00000000000..7b60751482f --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._power_bi_dedicated import PowerBIDedicated +__all__ = ['PowerBIDedicated'] diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_configuration.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_configuration.py new file mode 100644 index 00000000000..83593702966 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class PowerBIDedicatedConfiguration(Configuration): + """Configuration for PowerBIDedicated. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(PowerBIDedicatedConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2017-10-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-powerbidedicated/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_power_bi_dedicated.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_power_bi_dedicated.py new file mode 100644 index 00000000000..ace802ddf64 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/_power_bi_dedicated.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import PowerBIDedicatedConfiguration +from .operations import CapacitiesOperations +from .operations import Operations +from .. import models + + +class PowerBIDedicated(object): + """PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. + + :ivar capacities: CapacitiesOperations operations + :vartype capacities: azure.mgmt.powerbidedicated.aio.operations.CapacitiesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.powerbidedicated.aio.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = PowerBIDedicatedConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.capacities = CapacitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "PowerBIDedicated": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/__init__.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/__init__.py new file mode 100644 index 00000000000..c7e89554f78 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._capacities_operations import CapacitiesOperations +from ._operations import Operations + +__all__ = [ + 'CapacitiesOperations', + 'Operations', +] diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_capacities_operations.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_capacities_operations.py new file mode 100644 index 00000000000..664da08b2a2 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_capacities_operations.py @@ -0,0 +1,1024 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CapacitiesOperations: + """CapacitiesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.powerbidedicated.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_details( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> "_models.DedicatedCapacity": + """Gets details about the specified dedicated capacity. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the dedicated capacity. It must be a minimum of 3 + characters, and a maximum of 63. + :type dedicated_capacity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DedicatedCapacity, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self.get_details.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + dedicated_capacity_name: str, + capacity_parameters: "_models.DedicatedCapacity", + **kwargs + ) -> "_models.DedicatedCapacity": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_parameters, 'DedicatedCapacity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + dedicated_capacity_name: str, + capacity_parameters: "_models.DedicatedCapacity", + **kwargs + ) -> AsyncLROPoller["_models.DedicatedCapacity"]: + """Provisions the specified Dedicated capacity based on the configuration specified in the + request. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be a minimum of 3 + characters, and a maximum of 63. + :type dedicated_capacity_name: str + :param capacity_parameters: Contains the information used to provision the Dedicated capacity. + :type capacity_parameters: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DedicatedCapacity or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + capacity_parameters=capacity_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes the specified Dedicated capacity. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. + :type dedicated_capacity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + dedicated_capacity_name: str, + capacity_update_parameters: "_models.DedicatedCapacityUpdateParameters", + **kwargs + ) -> "_models.DedicatedCapacity": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_update_parameters, 'DedicatedCapacityUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + dedicated_capacity_name: str, + capacity_update_parameters: "_models.DedicatedCapacityUpdateParameters", + **kwargs + ) -> AsyncLROPoller["_models.DedicatedCapacity"]: + """Updates the current state of the specified Dedicated capacity. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. + :type dedicated_capacity_name: str + :param capacity_update_parameters: Request object that contains the updated information for the + capacity. + :type capacity_update_parameters: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DedicatedCapacity or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + capacity_update_parameters=capacity_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + async def _suspend_initial( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self._suspend_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend'} # type: ignore + + async def begin_suspend( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Suspends operation of the specified dedicated capacity instance. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. + :type dedicated_capacity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._suspend_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend'} # type: ignore + + async def _resume_initial( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self._resume_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume'} # type: ignore + + async def begin_resume( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Resumes operation of the specified Dedicated capacity instance. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. + :type dedicated_capacity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._resume_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.DedicatedCapacities"]: + """Gets all the Dedicated capacities for the given resource group. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DedicatedCapacities or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacities] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacities"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DedicatedCapacities', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities'} # type: ignore + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.DedicatedCapacities"]: + """Lists all the Dedicated capacities for the given subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DedicatedCapacities or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacities] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacities"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DedicatedCapacities', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities'} # type: ignore + + async def list_skus( + self, + **kwargs + ) -> "_models.SkuEnumerationForNewResourceResult": + """Lists eligible SKUs for PowerBI Dedicated resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuEnumerationForNewResourceResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.SkuEnumerationForNewResourceResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuEnumerationForNewResourceResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuEnumerationForNewResourceResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus'} # type: ignore + + async def list_skus_for_capacity( + self, + resource_group_name: str, + dedicated_capacity_name: str, + **kwargs + ) -> "_models.SkuEnumerationForExistingResourceResult": + """Lists eligible SKUs for a PowerBI Dedicated resource. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. + :type resource_group_name: str + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. + :type dedicated_capacity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuEnumerationForExistingResourceResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.SkuEnumerationForExistingResourceResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuEnumerationForExistingResourceResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus_for_capacity.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuEnumerationForExistingResourceResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus_for_capacity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus'} # type: ignore + + async def check_name_availability( + self, + location: str, + capacity_parameters: "_models.CheckCapacityNameAvailabilityParameters", + **kwargs + ) -> "_models.CheckCapacityNameAvailabilityResult": + """Check the name availability in the target location. + + :param location: The region name which the operation will lookup into. + :type location: str + :param capacity_parameters: The name of the capacity. + :type capacity_parameters: ~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckCapacityNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckCapacityNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_parameters, 'CheckCapacityNameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckCapacityNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_operations.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_operations.py new file mode 100644 index 00000000000..1b130a01868 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.powerbidedicated.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.OperationListResult"]: + """Lists all of the available PowerBIDedicated REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.powerbidedicated.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.PowerBIDedicated/operations'} # type: ignore diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/__init__.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/__init__.py index 10c803f3bf2..374d98e77cc 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/__init__.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/__init__.py @@ -1,67 +1,76 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import CheckCapacityNameAvailabilityParameters from ._models_py3 import CheckCapacityNameAvailabilityResult + from ._models_py3 import DedicatedCapacities from ._models_py3 import DedicatedCapacity from ._models_py3 import DedicatedCapacityAdministrators + from ._models_py3 import DedicatedCapacityMutableProperties + from ._models_py3 import DedicatedCapacityProperties from ._models_py3 import DedicatedCapacityUpdateParameters - from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponseError from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult from ._models_py3 import Resource from ._models_py3 import ResourceSku from ._models_py3 import SkuDetailsForExistingResource from ._models_py3 import SkuEnumerationForExistingResourceResult from ._models_py3 import SkuEnumerationForNewResourceResult except (SyntaxError, ImportError): - from ._models import CheckCapacityNameAvailabilityParameters - from ._models import CheckCapacityNameAvailabilityResult - from ._models import DedicatedCapacity - from ._models import DedicatedCapacityAdministrators - from ._models import DedicatedCapacityUpdateParameters - from ._models import ErrorResponse, ErrorResponseException - from ._models import Operation - from ._models import OperationDisplay - from ._models import Resource - from ._models import ResourceSku - from ._models import SkuDetailsForExistingResource - from ._models import SkuEnumerationForExistingResourceResult - from ._models import SkuEnumerationForNewResourceResult -from ._paged_models import DedicatedCapacityPaged -from ._paged_models import OperationPaged -from ._power_bi_dedicated_management_client_enums import ( + from ._models import CheckCapacityNameAvailabilityParameters # type: ignore + from ._models import CheckCapacityNameAvailabilityResult # type: ignore + from ._models import DedicatedCapacities # type: ignore + from ._models import DedicatedCapacity # type: ignore + from ._models import DedicatedCapacityAdministrators # type: ignore + from ._models import DedicatedCapacityMutableProperties # type: ignore + from ._models import DedicatedCapacityProperties # type: ignore + from ._models import DedicatedCapacityUpdateParameters # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import ErrorResponseError # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceSku # type: ignore + from ._models import SkuDetailsForExistingResource # type: ignore + from ._models import SkuEnumerationForExistingResourceResult # type: ignore + from ._models import SkuEnumerationForNewResourceResult # type: ignore + +from ._power_bi_dedicated_enums import ( + ProvisioningState, SkuTier, State, - ProvisioningState, ) __all__ = [ 'CheckCapacityNameAvailabilityParameters', 'CheckCapacityNameAvailabilityResult', + 'DedicatedCapacities', 'DedicatedCapacity', 'DedicatedCapacityAdministrators', + 'DedicatedCapacityMutableProperties', + 'DedicatedCapacityProperties', 'DedicatedCapacityUpdateParameters', - 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse', + 'ErrorResponseError', 'Operation', 'OperationDisplay', + 'OperationListResult', 'Resource', 'ResourceSku', 'SkuDetailsForExistingResource', 'SkuEnumerationForExistingResourceResult', 'SkuEnumerationForNewResourceResult', - 'DedicatedCapacityPaged', - 'OperationPaged', + 'ProvisioningState', 'SkuTier', 'State', - 'ProvisioningState', ] diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models.py index c84f4f1ffd1..2a15f705bf9 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models.py @@ -1,25 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +from azure.core.exceptions import HttpResponseError +import msrest.serialization -class CheckCapacityNameAvailabilityParameters(Model): +class CheckCapacityNameAvailabilityParameters(msrest.serialization.Model): """Details of capacity name request body. :param name: Name for checking availability. :type name: str - :param type: The resource type of PowerBI dedicated. Default value: - "Microsoft.PowerBIDedicated/capacities" . + :param type: The resource type of PowerBI dedicated. :type type: str """ @@ -32,13 +28,16 @@ class CheckCapacityNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CheckCapacityNameAvailabilityParameters, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', "Microsoft.PowerBIDedicated/capacities") -class CheckCapacityNameAvailabilityResult(Model): +class CheckCapacityNameAvailabilityResult(msrest.serialization.Model): """The checking result of capacity name availability. :param name_available: Indicator of availability of the capacity name. @@ -55,26 +54,45 @@ class CheckCapacityNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CheckCapacityNameAvailabilityResult, self).__init__(**kwargs) self.name_available = kwargs.get('name_available', None) self.reason = kwargs.get('reason', None) self.message = kwargs.get('message', None) -class CloudError(Model): - """CloudError. +class DedicatedCapacities(msrest.serialization.Model): + """An array of Dedicated capacities resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of Dedicated capacities resources. + :type value: list[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] """ + _validation = { + 'value': {'required': True}, + } + _attribute_map = { + 'value': {'key': 'value', 'type': '[DedicatedCapacity]'}, } + def __init__( + self, + **kwargs + ): + super(DedicatedCapacities, self).__init__(**kwargs) + self.value = kwargs['value'] + -class Resource(Model): +class Resource(msrest.serialization.Model): """Represents an instance of an PowerBI Dedicated resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -88,8 +106,7 @@ class Resource(Model): :type location: str :param sku: Required. The SKU of the PowerBI Dedicated resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional resource provisioning - properties. + :param tags: A set of tags. Key-value pairs of additional resource provisioning properties. :type tags: dict[str, str] """ @@ -110,21 +127,23 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) + self.location = kwargs['location'] + self.sku = kwargs['sku'] self.tags = kwargs.get('tags', None) class DedicatedCapacity(Resource): """Represents an instance of a Dedicated Capacity resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -138,25 +157,22 @@ class DedicatedCapacity(Resource): :type location: str :param sku: Required. The SKU of the PowerBI Dedicated resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional resource provisioning - properties. + :param tags: A set of tags. Key-value pairs of additional resource provisioning properties. :type tags: dict[str, str] - :param administration: A collection of Dedicated capacity administrators - :type administration: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators - :ivar state: The current state of PowerBI Dedicated resource. The state is - to indicate more states outside of resource provisioning. Possible values - include: 'Deleting', 'Succeeded', 'Failed', 'Paused', 'Suspended', - 'Provisioning', 'Updating', 'Suspending', 'Pausing', 'Resuming', - 'Preparing', 'Scaling' + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + :ivar state: The current state of PowerBI Dedicated resource. The state is to indicate more + states outside of resource provisioning. Possible values include: "Deleting", "Succeeded", + "Failed", "Paused", "Suspended", "Provisioning", "Updating", "Suspending", "Pausing", + "Resuming", "Preparing", "Scaling". :vartype state: str or ~azure.mgmt.powerbidedicated.models.State - :ivar provisioning_state: The current deployment state of PowerBI - Dedicated resource. The provisioningState is to indicate states for - resource provisioning. Possible values include: 'Deleting', 'Succeeded', - 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating', 'Suspending', - 'Pausing', 'Resuming', 'Preparing', 'Scaling' - :vartype provisioning_state: str or - ~azure.mgmt.powerbidedicated.models.ProvisioningState + :ivar provisioning_state: The current deployment state of PowerBI Dedicated resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Deleting", "Succeeded", "Failed", "Paused", "Suspended", "Provisioning", "Updating", + "Suspending", "Pausing", "Resuming", "Preparing", "Scaling". + :vartype provisioning_state: str or ~azure.mgmt.powerbidedicated.models.ProvisioningState """ _validation = { @@ -165,6 +181,7 @@ class DedicatedCapacity(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'mode': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -177,18 +194,23 @@ class DedicatedCapacity(Resource): 'sku': {'key': 'sku', 'type': 'ResourceSku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'administration': {'key': 'properties.administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DedicatedCapacity, self).__init__(**kwargs) self.administration = kwargs.get('administration', None) + self.mode = None self.state = None self.provisioning_state = None -class DedicatedCapacityAdministrators(Model): +class DedicatedCapacityAdministrators(msrest.serialization.Model): """An array of administrator user identities. :param members: An array of administrator user identities. @@ -199,73 +221,169 @@ class DedicatedCapacityAdministrators(Model): 'members': {'key': 'members', 'type': '[str]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DedicatedCapacityAdministrators, self).__init__(**kwargs) self.members = kwargs.get('members', None) -class DedicatedCapacityUpdateParameters(Model): +class DedicatedCapacityMutableProperties(msrest.serialization.Model): + """An object that represents a set of mutable Dedicated capacity resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + """ + + _validation = { + 'mode': {'readonly': True}, + } + + _attribute_map = { + 'administration': {'key': 'administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DedicatedCapacityMutableProperties, self).__init__(**kwargs) + self.administration = kwargs.get('administration', None) + self.mode = None + + +class DedicatedCapacityProperties(DedicatedCapacityMutableProperties): + """Properties of Dedicated Capacity resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + :ivar state: The current state of PowerBI Dedicated resource. The state is to indicate more + states outside of resource provisioning. Possible values include: "Deleting", "Succeeded", + "Failed", "Paused", "Suspended", "Provisioning", "Updating", "Suspending", "Pausing", + "Resuming", "Preparing", "Scaling". + :vartype state: str or ~azure.mgmt.powerbidedicated.models.State + :ivar provisioning_state: The current deployment state of PowerBI Dedicated resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Deleting", "Succeeded", "Failed", "Paused", "Suspended", "Provisioning", "Updating", + "Suspending", "Pausing", "Resuming", "Preparing", "Scaling". + :vartype provisioning_state: str or ~azure.mgmt.powerbidedicated.models.ProvisioningState + """ + + _validation = { + 'mode': {'readonly': True}, + 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'administration': {'key': 'administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DedicatedCapacityProperties, self).__init__(**kwargs) + self.state = None + self.provisioning_state = None + + +class DedicatedCapacityUpdateParameters(msrest.serialization.Model): """Provision request specification. + Variables are only populated by the server, and will be ignored when sending a request. + :param sku: The SKU of the Dedicated capacity resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional provisioning properties. + :param tags: A set of tags. Key-value pairs of additional provisioning properties. :type tags: dict[str, str] - :param administration: A collection of Dedicated capacity administrators - :type administration: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str """ + _validation = { + 'mode': {'readonly': True}, + } + _attribute_map = { 'sku': {'key': 'sku', 'type': 'ResourceSku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'administration': {'key': 'properties.administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(DedicatedCapacityUpdateParameters, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) self.tags = kwargs.get('tags', None) self.administration = kwargs.get('administration', None) + self.mode = None -class ErrorResponse(Model): +class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str + :param error: The error object. + :type error: ~azure.mgmt.powerbidedicated.models.ErrorResponseError """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + self.error = kwargs.get('error', None) -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. +class ErrorResponseError(msrest.serialization.Model): + """The error object. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ - def __init__(self, deserialize, response, *args): + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + def __init__( + self, + **kwargs + ): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) -class Operation(Model): +class Operation(msrest.serialization.Model): """Capacities REST API operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str @@ -282,22 +400,23 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Operation, self).__init__(**kwargs) self.name = None self.display = kwargs.get('display', None) -class OperationDisplay(Model): +class OperationDisplay(msrest.serialization.Model): """The object that represents the operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar provider: Service provider: Microsoft.PowerBIDedicated. :vartype provider: str - :ivar resource: Resource on which the operation is performed: capacity, - etc. + :ivar resource: Resource on which the operation is performed: capacity, etc. :vartype resource: str :ivar operation: Operation type: create, update, delete, etc. :vartype operation: str @@ -315,23 +434,55 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None -class ResourceSku(Model): - """Represents the SKU name and Azure pricing tier for PowerBI Dedicated - resource. +class OperationListResult(msrest.serialization.Model): + """Result listing capacities. It contains a list of operations and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of capacities supported by the Microsoft.PowerBIDedicated resource provider. + :vartype value: list[~azure.mgmt.powerbidedicated.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceSku(msrest.serialization.Model): + """Represents the SKU name and Azure pricing tier for PowerBI Dedicated resource. All required parameters must be populated in order to send to Azure. :param name: Required. Name of the SKU level. :type name: str - :param tier: The name of the Azure pricing tier to which the SKU applies. - Possible values include: 'PBIE_Azure' + :param tier: The name of the Azure pricing tier to which the SKU applies. Possible values + include: "PBIE_Azure". :type tier: str or ~azure.mgmt.powerbidedicated.models.SkuTier """ @@ -344,13 +495,16 @@ class ResourceSku(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ResourceSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] self.tier = kwargs.get('tier', None) -class SkuDetailsForExistingResource(Model): +class SkuDetailsForExistingResource(msrest.serialization.Model): """An object that represents SKU details for existing resources. :param sku: The SKU in SKU details for existing resources. @@ -361,32 +515,37 @@ class SkuDetailsForExistingResource(Model): 'sku': {'key': 'sku', 'type': 'ResourceSku'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuDetailsForExistingResource, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) -class SkuEnumerationForExistingResourceResult(Model): +class SkuEnumerationForExistingResourceResult(msrest.serialization.Model): """An object that represents enumerating SKUs for existing resources. - :param value: The collection of available SKUs for existing resources - :type value: - list[~azure.mgmt.powerbidedicated.models.SkuDetailsForExistingResource] + :param value: The collection of available SKUs for existing resources. + :type value: list[~azure.mgmt.powerbidedicated.models.SkuDetailsForExistingResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[SkuDetailsForExistingResource]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuEnumerationForExistingResourceResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class SkuEnumerationForNewResourceResult(Model): +class SkuEnumerationForNewResourceResult(msrest.serialization.Model): """An object that represents enumerating SKUs for new resources. - :param value: The collection of available SKUs for new resources + :param value: The collection of available SKUs for new resources. :type value: list[~azure.mgmt.powerbidedicated.models.ResourceSku] """ @@ -394,6 +553,9 @@ class SkuEnumerationForNewResourceResult(Model): 'value': {'key': 'value', 'type': '[ResourceSku]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SkuEnumerationForNewResourceResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models_py3.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models_py3.py index 3069ecfff80..3144411b0b4 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models_py3.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_models_py3.py @@ -1,25 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +from typing import Dict, List, Optional, Union +from azure.core.exceptions import HttpResponseError +import msrest.serialization -class CheckCapacityNameAvailabilityParameters(Model): +from ._power_bi_dedicated_enums import * + + +class CheckCapacityNameAvailabilityParameters(msrest.serialization.Model): """Details of capacity name request body. :param name: Name for checking availability. :type name: str - :param type: The resource type of PowerBI dedicated. Default value: - "Microsoft.PowerBIDedicated/capacities" . + :param type: The resource type of PowerBI dedicated. :type type: str """ @@ -32,13 +32,19 @@ class CheckCapacityNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str=None, type: str="Microsoft.PowerBIDedicated/capacities", **kwargs) -> None: + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = "Microsoft.PowerBIDedicated/capacities", + **kwargs + ): super(CheckCapacityNameAvailabilityParameters, self).__init__(**kwargs) self.name = name self.type = type -class CheckCapacityNameAvailabilityResult(Model): +class CheckCapacityNameAvailabilityResult(msrest.serialization.Model): """The checking result of capacity name availability. :param name_available: Indicator of availability of the capacity name. @@ -55,26 +61,51 @@ class CheckCapacityNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): super(CheckCapacityNameAvailabilityResult, self).__init__(**kwargs) self.name_available = name_available self.reason = reason self.message = message -class CloudError(Model): - """CloudError. +class DedicatedCapacities(msrest.serialization.Model): + """An array of Dedicated capacities resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An array of Dedicated capacities resources. + :type value: list[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] """ + _validation = { + 'value': {'required': True}, + } + _attribute_map = { + 'value': {'key': 'value', 'type': '[DedicatedCapacity]'}, } + def __init__( + self, + *, + value: List["DedicatedCapacity"], + **kwargs + ): + super(DedicatedCapacities, self).__init__(**kwargs) + self.value = value + -class Resource(Model): +class Resource(msrest.serialization.Model): """Represents an instance of an PowerBI Dedicated resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -88,8 +119,7 @@ class Resource(Model): :type location: str :param sku: Required. The SKU of the PowerBI Dedicated resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional resource provisioning - properties. + :param tags: A set of tags. Key-value pairs of additional resource provisioning properties. :type tags: dict[str, str] """ @@ -110,7 +140,14 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + sku: "ResourceSku", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -123,8 +160,7 @@ def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: class DedicatedCapacity(Resource): """Represents an instance of a Dedicated Capacity resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -138,25 +174,22 @@ class DedicatedCapacity(Resource): :type location: str :param sku: Required. The SKU of the PowerBI Dedicated resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional resource provisioning - properties. + :param tags: A set of tags. Key-value pairs of additional resource provisioning properties. :type tags: dict[str, str] - :param administration: A collection of Dedicated capacity administrators - :type administration: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators - :ivar state: The current state of PowerBI Dedicated resource. The state is - to indicate more states outside of resource provisioning. Possible values - include: 'Deleting', 'Succeeded', 'Failed', 'Paused', 'Suspended', - 'Provisioning', 'Updating', 'Suspending', 'Pausing', 'Resuming', - 'Preparing', 'Scaling' + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + :ivar state: The current state of PowerBI Dedicated resource. The state is to indicate more + states outside of resource provisioning. Possible values include: "Deleting", "Succeeded", + "Failed", "Paused", "Suspended", "Provisioning", "Updating", "Suspending", "Pausing", + "Resuming", "Preparing", "Scaling". :vartype state: str or ~azure.mgmt.powerbidedicated.models.State - :ivar provisioning_state: The current deployment state of PowerBI - Dedicated resource. The provisioningState is to indicate states for - resource provisioning. Possible values include: 'Deleting', 'Succeeded', - 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating', 'Suspending', - 'Pausing', 'Resuming', 'Preparing', 'Scaling' - :vartype provisioning_state: str or - ~azure.mgmt.powerbidedicated.models.ProvisioningState + :ivar provisioning_state: The current deployment state of PowerBI Dedicated resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Deleting", "Succeeded", "Failed", "Paused", "Suspended", "Provisioning", "Updating", + "Suspending", "Pausing", "Resuming", "Preparing", "Scaling". + :vartype provisioning_state: str or ~azure.mgmt.powerbidedicated.models.ProvisioningState """ _validation = { @@ -165,6 +198,7 @@ class DedicatedCapacity(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'mode': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -177,18 +211,28 @@ class DedicatedCapacity(Resource): 'sku': {'key': 'sku', 'type': 'ResourceSku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'administration': {'key': 'properties.administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str, sku, tags=None, administration=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + sku: "ResourceSku", + tags: Optional[Dict[str, str]] = None, + administration: Optional["DedicatedCapacityAdministrators"] = None, + **kwargs + ): super(DedicatedCapacity, self).__init__(location=location, sku=sku, tags=tags, **kwargs) self.administration = administration + self.mode = None self.state = None self.provisioning_state = None -class DedicatedCapacityAdministrators(Model): +class DedicatedCapacityAdministrators(msrest.serialization.Model): """An array of administrator user identities. :param members: An array of administrator user identities. @@ -199,73 +243,184 @@ class DedicatedCapacityAdministrators(Model): 'members': {'key': 'members', 'type': '[str]'}, } - def __init__(self, *, members=None, **kwargs) -> None: + def __init__( + self, + *, + members: Optional[List[str]] = None, + **kwargs + ): super(DedicatedCapacityAdministrators, self).__init__(**kwargs) self.members = members -class DedicatedCapacityUpdateParameters(Model): +class DedicatedCapacityMutableProperties(msrest.serialization.Model): + """An object that represents a set of mutable Dedicated capacity resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + """ + + _validation = { + 'mode': {'readonly': True}, + } + + _attribute_map = { + 'administration': {'key': 'administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + administration: Optional["DedicatedCapacityAdministrators"] = None, + **kwargs + ): + super(DedicatedCapacityMutableProperties, self).__init__(**kwargs) + self.administration = administration + self.mode = None + + +class DedicatedCapacityProperties(DedicatedCapacityMutableProperties): + """Properties of Dedicated Capacity resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str + :ivar state: The current state of PowerBI Dedicated resource. The state is to indicate more + states outside of resource provisioning. Possible values include: "Deleting", "Succeeded", + "Failed", "Paused", "Suspended", "Provisioning", "Updating", "Suspending", "Pausing", + "Resuming", "Preparing", "Scaling". + :vartype state: str or ~azure.mgmt.powerbidedicated.models.State + :ivar provisioning_state: The current deployment state of PowerBI Dedicated resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Deleting", "Succeeded", "Failed", "Paused", "Suspended", "Provisioning", "Updating", + "Suspending", "Pausing", "Resuming", "Preparing", "Scaling". + :vartype provisioning_state: str or ~azure.mgmt.powerbidedicated.models.ProvisioningState + """ + + _validation = { + 'mode': {'readonly': True}, + 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'administration': {'key': 'administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + administration: Optional["DedicatedCapacityAdministrators"] = None, + **kwargs + ): + super(DedicatedCapacityProperties, self).__init__(administration=administration, **kwargs) + self.state = None + self.provisioning_state = None + + +class DedicatedCapacityUpdateParameters(msrest.serialization.Model): """Provision request specification. + Variables are only populated by the server, and will be ignored when sending a request. + :param sku: The SKU of the Dedicated capacity resource. :type sku: ~azure.mgmt.powerbidedicated.models.ResourceSku - :param tags: Key-value pairs of additional provisioning properties. + :param tags: A set of tags. Key-value pairs of additional provisioning properties. :type tags: dict[str, str] - :param administration: A collection of Dedicated capacity administrators - :type administration: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :param administration: A collection of Dedicated capacity administrators. + :type administration: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityAdministrators + :ivar mode: The capacity mode. + :vartype mode: str """ + _validation = { + 'mode': {'readonly': True}, + } + _attribute_map = { 'sku': {'key': 'sku', 'type': 'ResourceSku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'administration': {'key': 'properties.administration', 'type': 'DedicatedCapacityAdministrators'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, } - def __init__(self, *, sku=None, tags=None, administration=None, **kwargs) -> None: + def __init__( + self, + *, + sku: Optional["ResourceSku"] = None, + tags: Optional[Dict[str, str]] = None, + administration: Optional["DedicatedCapacityAdministrators"] = None, + **kwargs + ): super(DedicatedCapacityUpdateParameters, self).__init__(**kwargs) self.sku = sku self.tags = tags self.administration = administration + self.mode = None -class ErrorResponse(Model): +class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str + :param error: The error object. + :type error: ~azure.mgmt.powerbidedicated.models.ErrorResponseError """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, } - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["ErrorResponseError"] = None, + **kwargs + ): super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message + self.error = error -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. +class ErrorResponseError(msrest.serialization.Model): + """The error object. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ - def __init__(self, deserialize, response, *args): + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = code + self.message = message -class Operation(Model): +class Operation(msrest.serialization.Model): """Capacities REST API operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str @@ -282,22 +437,25 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, *, display=None, **kwargs) -> None: + def __init__( + self, + *, + display: Optional["OperationDisplay"] = None, + **kwargs + ): super(Operation, self).__init__(**kwargs) self.name = None self.display = display -class OperationDisplay(Model): +class OperationDisplay(msrest.serialization.Model): """The object that represents the operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar provider: Service provider: Microsoft.PowerBIDedicated. :vartype provider: str - :ivar resource: Resource on which the operation is performed: capacity, - etc. + :ivar resource: Resource on which the operation is performed: capacity, etc. :vartype resource: str :ivar operation: Operation type: create, update, delete, etc. :vartype operation: str @@ -315,23 +473,55 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None -class ResourceSku(Model): - """Represents the SKU name and Azure pricing tier for PowerBI Dedicated - resource. +class OperationListResult(msrest.serialization.Model): + """Result listing capacities. It contains a list of operations and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of capacities supported by the Microsoft.PowerBIDedicated resource provider. + :vartype value: list[~azure.mgmt.powerbidedicated.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceSku(msrest.serialization.Model): + """Represents the SKU name and Azure pricing tier for PowerBI Dedicated resource. All required parameters must be populated in order to send to Azure. :param name: Required. Name of the SKU level. :type name: str - :param tier: The name of the Azure pricing tier to which the SKU applies. - Possible values include: 'PBIE_Azure' + :param tier: The name of the Azure pricing tier to which the SKU applies. Possible values + include: "PBIE_Azure". :type tier: str or ~azure.mgmt.powerbidedicated.models.SkuTier """ @@ -344,13 +534,19 @@ class ResourceSku(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, *, name: str, tier=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + tier: Optional[Union[str, "SkuTier"]] = None, + **kwargs + ): super(ResourceSku, self).__init__(**kwargs) self.name = name self.tier = tier -class SkuDetailsForExistingResource(Model): +class SkuDetailsForExistingResource(msrest.serialization.Model): """An object that represents SKU details for existing resources. :param sku: The SKU in SKU details for existing resources. @@ -361,32 +557,41 @@ class SkuDetailsForExistingResource(Model): 'sku': {'key': 'sku', 'type': 'ResourceSku'}, } - def __init__(self, *, sku=None, **kwargs) -> None: + def __init__( + self, + *, + sku: Optional["ResourceSku"] = None, + **kwargs + ): super(SkuDetailsForExistingResource, self).__init__(**kwargs) self.sku = sku -class SkuEnumerationForExistingResourceResult(Model): +class SkuEnumerationForExistingResourceResult(msrest.serialization.Model): """An object that represents enumerating SKUs for existing resources. - :param value: The collection of available SKUs for existing resources - :type value: - list[~azure.mgmt.powerbidedicated.models.SkuDetailsForExistingResource] + :param value: The collection of available SKUs for existing resources. + :type value: list[~azure.mgmt.powerbidedicated.models.SkuDetailsForExistingResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[SkuDetailsForExistingResource]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["SkuDetailsForExistingResource"]] = None, + **kwargs + ): super(SkuEnumerationForExistingResourceResult, self).__init__(**kwargs) self.value = value -class SkuEnumerationForNewResourceResult(Model): +class SkuEnumerationForNewResourceResult(msrest.serialization.Model): """An object that represents enumerating SKUs for new resources. - :param value: The collection of available SKUs for new resources + :param value: The collection of available SKUs for new resources. :type value: list[~azure.mgmt.powerbidedicated.models.ResourceSku] """ @@ -394,6 +599,11 @@ class SkuEnumerationForNewResourceResult(Model): 'value': {'key': 'value', 'type': '[ResourceSku]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["ResourceSku"]] = None, + **kwargs + ): super(SkuEnumerationForNewResourceResult, self).__init__(**kwargs) self.value = value diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_paged_models.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_paged_models.py deleted file mode 100644 index 455e1a1bea6..00000000000 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_paged_models.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DedicatedCapacityPaged(Paged): - """ - A paging container for iterating over a list of :class:`DedicatedCapacity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DedicatedCapacity]'} - } - - def __init__(self, *args, **kwargs): - - super(DedicatedCapacityPaged, self).__init__(*args, **kwargs) -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_enums.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_enums.py new file mode 100644 index 00000000000..00e1be5a600 --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_enums.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current deployment state of PowerBI Dedicated resource. The provisioningState is to + indicate states for resource provisioning. + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + PAUSED = "Paused" + SUSPENDED = "Suspended" + PROVISIONING = "Provisioning" + UPDATING = "Updating" + SUSPENDING = "Suspending" + PAUSING = "Pausing" + RESUMING = "Resuming" + PREPARING = "Preparing" + SCALING = "Scaling" + +class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The name of the Azure pricing tier to which the SKU applies. + """ + + PBIE_AZURE = "PBIE_Azure" + +class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of PowerBI Dedicated resource. The state is to indicate more states outside + of resource provisioning. + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + PAUSED = "Paused" + SUSPENDED = "Suspended" + PROVISIONING = "Provisioning" + UPDATING = "Updating" + SUSPENDING = "Suspending" + PAUSING = "Pausing" + RESUMING = "Resuming" + PREPARING = "Preparing" + SCALING = "Scaling" diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_management_client_enums.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_management_client_enums.py deleted file mode 100644 index c285e1c2ef0..00000000000 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/models/_power_bi_dedicated_management_client_enums.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class SkuTier(str, Enum): - - pbie_azure = "PBIE_Azure" - - -class State(str, Enum): - - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - paused = "Paused" - suspended = "Suspended" - provisioning = "Provisioning" - updating = "Updating" - suspending = "Suspending" - pausing = "Pausing" - resuming = "Resuming" - preparing = "Preparing" - scaling = "Scaling" - - -class ProvisioningState(str, Enum): - - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - paused = "Paused" - suspended = "Suspended" - provisioning = "Provisioning" - updating = "Updating" - suspending = "Suspending" - pausing = "Pausing" - resuming = "Resuming" - preparing = "Preparing" - scaling = "Scaling" diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/__init__.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/__init__.py index 6497b194000..c7e89554f78 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/__init__.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._capacities_operations import CapacitiesOperations diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_capacities_operations.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_capacities_operations.py index d225cc90936..1ee63acfcbc 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_capacities_operations.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_capacities_operations.py @@ -1,897 +1,1044 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class CapacitiesOperations(object): """CapacitiesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.powerbidedicated.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2017-10-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-01" - - self.config = config + self._config = config def get_details( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DedicatedCapacity" """Gets details about the specified dedicated capacity. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the dedicated capacity. It - must be a minimum of 3 characters, and a maximum of 63. + :param dedicated_capacity_name: The name of the dedicated capacity. It must be a minimum of 3 + characters, and a maximum of 63. :type dedicated_capacity_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DedicatedCapacity or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DedicatedCapacity, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.get_details.metadata['url'] + url = self.get_details.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DedicatedCapacity', response) + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} - + get_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore def _create_initial( - self, resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + capacity_parameters, # type: "_models.DedicatedCapacity" + **kwargs # type: Any + ): + # type: (...) -> "_models.DedicatedCapacity" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create.metadata['url'] + url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(capacity_parameters, 'DedicatedCapacity') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_parameters, 'DedicatedCapacity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DedicatedCapacity', response) + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('DedicatedCapacity', response) + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create( - self, resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Provisions the specified Dedicated capacity based on the configuration - specified in the request. - - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + capacity_parameters, # type: "_models.DedicatedCapacity" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DedicatedCapacity"] + """Provisions the specified Dedicated capacity based on the configuration specified in the + request. + + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be a minimum of 3 characters, and a maximum of 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be a minimum of 3 + characters, and a maximum of 63. :type dedicated_capacity_name: str - :param capacity_parameters: Contains the information used to provision - the Dedicated capacity. - :type capacity_parameters: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacity - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :param capacity_parameters: Contains the information used to provision the Dedicated capacity. + :type capacity_parameters: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns DedicatedCapacity or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DedicatedCapacity or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - dedicated_capacity_name=dedicated_capacity_name, - capacity_parameters=capacity_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('DedicatedCapacity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + capacity_parameters=capacity_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore def _delete_initial( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes the specified Dedicated capacity. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be at least 3 characters in length, and no more than 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. :type dedicated_capacity_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - dedicated_capacity_name=dedicated_capacity_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore def _update_initial( - self, resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + capacity_update_parameters, # type: "_models.DedicatedCapacityUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.DedicatedCapacity" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.update.metadata['url'] + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(capacity_update_parameters, 'DedicatedCapacityUpdateParameters') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_update_parameters, 'DedicatedCapacityUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('DedicatedCapacity', response) + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + if response.status_code == 202: - deserialized = self._deserialize('DedicatedCapacity', response) + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update( - self, resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + capacity_update_parameters, # type: "_models.DedicatedCapacityUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DedicatedCapacity"] """Updates the current state of the specified Dedicated capacity. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be at least 3 characters in length, and no more than 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. :type dedicated_capacity_name: str - :param capacity_update_parameters: Request object that contains the - updated information for the capacity. - :type capacity_update_parameters: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :param capacity_update_parameters: Request object that contains the updated information for the + capacity. + :type capacity_update_parameters: ~azure.mgmt.powerbidedicated.models.DedicatedCapacityUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns DedicatedCapacity or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DedicatedCapacity or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - dedicated_capacity_name=dedicated_capacity_name, - capacity_update_parameters=capacity_update_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacity"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('DedicatedCapacity', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + capacity_update_parameters=capacity_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DedicatedCapacity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'} # type: ignore def _suspend_initial( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.suspend.metadata['url'] + url = self._suspend_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def suspend( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend'} # type: ignore + + def begin_suspend( + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Suspends operation of the specified dedicated capacity instance. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be at least 3 characters in length, and no more than 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. :type dedicated_capacity_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._suspend_initial( - resource_group_name=resource_group_name, - dedicated_capacity_name=dedicated_capacity_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend'} # type: ignore def _resume_initial( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.resume.metadata['url'] + url = self._resume_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def resume( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume'} # type: ignore + + def begin_resume( + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Resumes operation of the specified Dedicated capacity instance. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be at least 3 characters in length, and no more than 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. :type dedicated_capacity_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._resume_initial( - resource_group_name=resource_group_name, - dedicated_capacity_name=dedicated_capacity_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + dedicated_capacity_name=dedicated_capacity_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DedicatedCapacities"] """Gets all the Dedicated capacities for the given resource group. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DedicatedCapacity - :rtype: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DedicatedCapacities or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacities] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacities"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('DedicatedCapacities', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DedicatedCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities'} # type: ignore def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DedicatedCapacities"] """Lists all the Dedicated capacities for the given subscription. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DedicatedCapacity - :rtype: - ~azure.mgmt.powerbidedicated.models.DedicatedCapacityPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacity] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DedicatedCapacities or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacities] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DedicatedCapacities"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('DedicatedCapacities', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DedicatedCapacityPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities'} # type: ignore def list_skus( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.SkuEnumerationForNewResourceResult" """Lists eligible SKUs for PowerBI Dedicated resource provider. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuEnumerationForNewResourceResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.powerbidedicated.models.SkuEnumerationForNewResourceResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuEnumerationForNewResourceResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.SkuEnumerationForNewResourceResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuEnumerationForNewResourceResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.list_skus.metadata['url'] + url = self.list_skus.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuEnumerationForNewResourceResult', response) + deserialized = self._deserialize('SkuEnumerationForNewResourceResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus'} + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus'} # type: ignore def list_skus_for_capacity( - self, resource_group_name, dedicated_capacity_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + dedicated_capacity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SkuEnumerationForExistingResourceResult" """Lists eligible SKUs for a PowerBI Dedicated resource. - :param resource_group_name: The name of the Azure Resource group of - which a given PowerBIDedicated capacity is part. This name must be at - least 1 character in length, and no more than 90. + :param resource_group_name: The name of the Azure Resource group of which a given + PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no + more than 90. :type resource_group_name: str - :param dedicated_capacity_name: The name of the Dedicated capacity. It - must be at least 3 characters in length, and no more than 63. + :param dedicated_capacity_name: The name of the Dedicated capacity. It must be at least 3 + characters in length, and no more than 63. :type dedicated_capacity_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SkuEnumerationForExistingResourceResult or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.powerbidedicated.models.SkuEnumerationForExistingResourceResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuEnumerationForExistingResourceResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.SkuEnumerationForExistingResourceResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuEnumerationForExistingResourceResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + # Construct URL - url = self.list_skus_for_capacity.metadata['url'] + url = self.list_skus_for_capacity.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'dedicatedCapacityName': self._serialize.url("dedicated_capacity_name", dedicated_capacity_name, 'str', max_length=63, min_length=3, pattern=r'^[a-z][a-z0-9]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SkuEnumerationForExistingResourceResult', response) + deserialized = self._deserialize('SkuEnumerationForExistingResourceResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_skus_for_capacity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus'} + list_skus_for_capacity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus'} # type: ignore def check_name_availability( - self, location, name=None, type="Microsoft.PowerBIDedicated/capacities", custom_headers=None, raw=False, **operation_config): + self, + location, # type: str + capacity_parameters, # type: "_models.CheckCapacityNameAvailabilityParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckCapacityNameAvailabilityResult" """Check the name availability in the target location. :param location: The region name which the operation will lookup into. :type location: str - :param name: Name for checking availability. - :type name: str - :param type: The resource type of PowerBI dedicated. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CheckCapacityNameAvailabilityResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param capacity_parameters: The name of the capacity. + :type capacity_parameters: ~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckCapacityNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError """ - capacity_parameters = models.CheckCapacityNameAvailabilityParameters(name=name, type=type) + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckCapacityNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.check_name_availability.metadata['url'] + url = self.check_name_availability.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(capacity_parameters, 'CheckCapacityNameAvailabilityParameters') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capacity_parameters, 'CheckCapacityNameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CheckCapacityNameAvailabilityResult', response) + deserialized = self._deserialize('CheckCapacityNameAvailabilityResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability'} + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_operations.py b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_operations.py index 0041d20a72b..491d70b1011 100644 --- a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_operations.py +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/operations/_operations.py @@ -1,99 +1,110 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class Operations(object): """Operations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.powerbidedicated.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The client API version. Constant value: "2017-10-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] """Lists all of the available PowerBIDedicated REST API operations. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.powerbidedicated.models.OperationPaged[~azure.mgmt.powerbidedicated.models.Operation] - :raises: - :class:`ErrorResponseException` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.powerbidedicated.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-10-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] - + url = self.list.metadata['url'] # type: ignore # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response + error = self._deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/providers/Microsoft.PowerBIDedicated/operations'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.PowerBIDedicated/operations'} # type: ignore diff --git a/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/py.typed b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/powerbidedicated/azext_powerbidedicated/vendored_sdks/powerbidedicated/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/powerbidedicated/setup.py b/src/powerbidedicated/setup.py index 2f463debee7..726ff2eb74b 100644 --- a/src/powerbidedicated/setup.py +++ b/src/powerbidedicated/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.2.0' +VERSION = '0.2.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From 5782c35dafbfe939df991c6777f9bed39b205878 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 16:13:14 +0800 Subject: [PATCH 21/37] [Release] Update index.json for extension [ mixed-reality ] (#3371) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=893310 Last commit: https://github.com/Azure/azure-cli-extensions/commit/a3f83b6568e7933926610e400b8a2c7e388ee677 --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index c2e73591110..483c6ea81e8 100644 --- a/src/index.json +++ b/src/index.json @@ -13585,6 +13585,49 @@ "version": "0.0.3" }, "sha256Digest": "29f07fa6db12c70f9b93a3914d61ea108a5f410f40bc92389c1a87ea9312c766" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/mixed_reality-0.0.4-py2.py3-none-any.whl", + "filename": "mixed_reality-0.0.4-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "xiangyul@microsoft.com", + "name": "Xiangyu Luo", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/mixed-reality" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "mixed-reality", + "summary": "Mixed Reality Azure CLI Extension.", + "version": "0.0.4" + }, + "sha256Digest": "509b675781949c69baa911261a0637ba5a0fac9b11ee458feea7ddfb71393fef" } ], "ml": [ From 80947e4d2cf15aefd517feb8b62703c53b6ff39c Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 16:13:46 +0800 Subject: [PATCH 22/37] [Release] Update index.json for extension [ powerbidedicated ] (#3488) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=941184 Last commit: https://github.com/Azure/azure-cli-extensions/commit/5853fbc4e157748778c67dde6a5a69cc7dfb813a --- src/index.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/index.json b/src/index.json index 483c6ea81e8..beac124f029 100644 --- a/src/index.json +++ b/src/index.json @@ -14384,6 +14384,52 @@ "version": "0.2.0" }, "sha256Digest": "127cb7b69076d07254aee3b57720409455e601ad431d3e12d713d886578ce1bf" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/powerbidedicated-0.2.1-py2.py3-none-any.whl", + "filename": "powerbidedicated-0.2.1-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.maxCliCoreVersion": "3.0.0", + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/powerbidedicated" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "powerbidedicated", + "summary": "Microsoft Azure Command-Line Tools PowerBIDedicated Extension", + "version": "0.2.1" + }, + "sha256Digest": "be1b824d4e4561ccfccebba9453d27a4542e6d4e6471eabe3def15bb1b35ca6f" } ], "providerhub": [ From d654c65bc5d6652bc3182d38b1c494a591ce6f5c Mon Sep 17 00:00:00 2001 From: FumingZhang <81607949+FumingZhang@users.noreply.github.com> Date: Thu, 10 Jun 2021 16:21:38 +0800 Subject: [PATCH 23/37] [AKS] Fix several live test cases in aks-preview (#3487) * remove redundant xxxx principals in test and add necessary --yes option * update default filter --- .../ext_matrix_default.json | 38 +- ...t_aks_create_with_ingress_appgw_addon.yaml | 314 ++++++++-------- ...gw_addon_with_deprecated_subet_prefix.yaml | 349 +++++++++--------- .../tests/latest/test_aks_commands.py | 18 +- 4 files changed, 354 insertions(+), 365 deletions(-) diff --git a/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json index cbbb90d3ca4..dffce3ffd09 100644 --- a/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json @@ -6,38 +6,34 @@ }, "exclude": { "need additional feature": [ - "test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation", - "test_aks_create_with_auto_upgrade_channel", - "test_aks_create_with_pod_identity_enabled", - "test_aks_create_with_azurekeyvaultsecretsprovider_addon", - "test_aks_create_using_azurecni_with_pod_identity_enabled", - "test_aks_create_with_gitops_addon", + "test_aks_create_with_ossku", + "test_aks_nodepool_add_with_ossku", "test_aks_create_with_node_config", - "test_aks_custom_kubelet_identity", - "test_aks_disable_addon_gitops", - "test_aks_disable_addon_openservicemesh", - "test_aks_pod_identity_usage", - "test_aks_create_with_openservicemesh_addon", + "test_aks_create_private_cluster_public_fqdn", + "test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation", "test_aks_update_azurekeyvaultsecretsprovider_with_secret_rotation", "test_aks_enable_addon_with_azurekeyvaultsecretsprovider", + "test_aks_create_with_gitops_addon", "test_aks_enable_addon_with_gitops", - "test_aks_create_with_fips", + "test_aks_disable_addon_gitops", + "test_aks_create_with_openservicemesh_addon", + "test_aks_enable_addon_with_openservicemesh", + "test_aks_disable_addon_openservicemesh", + "test_aks_create_with_auto_upgrade_channel", + "test_aks_create_with_azurekeyvaultsecretsprovider_addon", + "test_aks_custom_kubelet_identity", "test_aks_disable_local_accounts", - "test_aks_nodepool_add_with_ossku", - "test_aks_create_with_ossku" + "test_aks_create_with_pod_identity_enabled", + "test_aks_create_using_azurecni_with_pod_identity_enabled", + "test_aks_pod_identity_usage", + "test_aks_create_with_fips" ], "unknown": [ "test_aks_create_and_update_with_managed_aad_enable_azure_rbac", - "test_aks_create_with_virtual_node_addon", "test_aks_update_to_msi_cluster_with_addons" ], "code bug": [ - "test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix", - "test_aks_byo_subnet_with_ingress_appgw_addon", - "test_aks_nodepool_get_upgrades", - "test_aks_byo_appgw_with_ingress_appgw_addon", - "test_aks_enable_addon_with_openservicemesh", - "test_aks_create_with_ingress_appgw_addon" + "test_aks_nodepool_get_upgrades" ] } } diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon.yaml index fffc26d4ab1..7a9cb63d89d 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon.yaml @@ -11,19 +11,15 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-resource/10.3.0 Azure-SDK-For-Python - AZURECLI/2.16.0 - accept-language: - - en-US + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2020-12-22T17:26:54Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-06-10T04:34:39Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -32,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 22 Dec 2020 17:27:04 GMT + - Thu, 10 Jun 2021 04:34:43 GMT expires: - '-1' pragma: @@ -48,18 +44,19 @@ interactions: message: OK - request: body: '{"location": "westus2", "properties": {"kubernetesVersion": "", "dnsPrefix": - "cliakstest-clitest6hnh3rvi7-86501d", "agentPoolProfiles": [{"count": 3, "vmSize": + "cliakstest-clitestyrifwz6ih-79a739", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": - "Delete", "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", - "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdabawEfwOujYnckZRvvkrcqoR+c2bLuoiOddqujUWHu+fBTEwDd8nB0vBemdGLNHmo7B3qpXyq9pcplUaGYzCmRZtnYy35UOtCinMqyT3mIJshJA1cIw70nFJbr2gvDl+XXtxmd59k5bWMUjzNdynurjhcA53b1fMHTFXSd5ugtbJ4SyZxPkNWxRtJ9Dg2RslMZ+3ZA9y8iAAMxnX85HpG1UMpwzvEM/jPoFd43UYB5TFZIRAcvlkZTQKaBtFW+Khg7Jx5C3iyPzSMAgDzS4WsJBCfABpJ8nnGzBEi/orhFydtkE/zsXOEMY8ppUpnBLN+LXD1gqWhEYRLF7atYd3 - vsonline@c541134d8e01\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001", + "Delete", "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001", "secret":"fake-secret"}, "addonProfiles": {"ingressApplicationGateway": {"enabled": true, "config": {"subnetCIDR": "10.2.0.0/16"}}}, "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": - "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}}, - "identity": {"type": "SystemAssigned"}}' + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' headers: Accept: - application/json @@ -70,67 +67,66 @@ interactions: Connection: - keep-alive Content-Length: - - '1368' + - '1504' Content-Type: - application/json; charset=utf-8 ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ - : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ - \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.18.10\",\n \"dnsPrefix\"\ - : \"cliakstest-clitest6hnh3rvi7-86501d\",\n \"fqdn\": \"cliakstest-clitest6hnh3rvi7-86501d-110abd56.hcp.westus2.staging.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.18.10\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2020.12.15\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdabawEfwOujYnckZRvvkrcqoR+c2bLuoiOddqujUWHu+fBTEwDd8nB0vBemdGLNHmo7B3qpXyq9pcplUaGYzCmRZtnYy35UOtCinMqyT3mIJshJA1cIw70nFJbr2gvDl+XXtxmd59k5bWMUjzNdynurjhcA53b1fMHTFXSd5ugtbJ4SyZxPkNWxRtJ9Dg2RslMZ+3ZA9y8iAAMxnX85HpG1UMpwzvEM/jPoFd43UYB5TFZIRAcvlkZTQKaBtFW+Khg7Jx5C3iyPzSMAgDzS4WsJBCfABpJ8nnGzBEi/orhFydtkE/zsXOEMY8ppUpnBLN+LXD1gqWhEYRLF7atYd3\ - \ vsonline@c541134d8e01\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ - : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ - \ \"addonProfiles\": {\n \"KubeDashboard\": {\n \"enabled\": false,\n\ - \ \"config\": null\n },\n \"ingressApplicationGateway\": {\n \ - \ \"enabled\": true,\n \"config\": {\n \"effectiveApplicationGatewayId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\"\ - ,\n \"subnetCIDR\": \"10.2.0.0/16\"\n }\n }\n },\n \"nodeResourceGroup\"\ - : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ - \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ - networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \ - \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ - : 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 10\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\ - ,\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\"\ - : \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ - : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestyrifwz6ih-79a739\",\n + \ \"fqdn\": \"cliakstest-clitestyrifwz6ih-79a739-0a0ef6cf.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestyrifwz6ih-79a739-0a0ef6cf.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\",\n + \ \"subnetCIDR\": \"10.2.0.0/16\"\n }\n }\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": + false\n },\n \"sku\": {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n + \ }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 cache-control: - no-cache content-length: - - '2873' + - '2962' content-type: - application/json date: - - Tue, 22 Dec 2020 17:27:14 GMT + - Thu, 10 Jun 2021 04:34:54 GMT expires: - '-1' pragma: @@ -142,7 +138,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -158,18 +154,18 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\"\n }" headers: cache-control: - no-cache @@ -178,7 +174,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:27:47 GMT + - Thu, 10 Jun 2021 04:35:26 GMT expires: - '-1' pragma: @@ -208,18 +204,18 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\"\n }" headers: cache-control: - no-cache @@ -228,7 +224,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:28:17 GMT + - Thu, 10 Jun 2021 04:35:58 GMT expires: - '-1' pragma: @@ -258,18 +254,18 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\"\n }" headers: cache-control: - no-cache @@ -278,7 +274,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:28:49 GMT + - Thu, 10 Jun 2021 04:36:29 GMT expires: - '-1' pragma: @@ -308,18 +304,18 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\"\n }" headers: cache-control: - no-cache @@ -328,7 +324,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:29:21 GMT + - Thu, 10 Jun 2021 04:37:01 GMT expires: - '-1' pragma: @@ -358,18 +354,18 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\"\n }" headers: cache-control: - no-cache @@ -378,7 +374,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:29:52 GMT + - Thu, 10 Jun 2021 04:37:33 GMT expires: - '-1' pragma: @@ -408,19 +404,19 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f9757ea1-2f07-4a33-9d1d-e61e1d7feec5?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a0df9abd-3659-4191-bb85-d3487a39a9d3?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"a17e75f9-072f-334a-9d1d-e61e1d7feec5\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2020-12-22T17:27:14.4153636Z\",\n \"\ - endTime\": \"2020-12-22T17:30:22.6182005Z\"\n }" + string: "{\n \"name\": \"bd9adfa0-5936-9141-bb85-d3487a39a9d3\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-06-10T04:34:54.0433333Z\",\n \"endTime\": + \"2021-06-10T04:37:57.9956858Z\"\n }" headers: cache-control: - no-cache @@ -429,7 +425,7 @@ interactions: content-type: - application/json date: - - Tue, 22 Dec 2020 17:30:22 GMT + - Thu, 10 Jun 2021 04:38:04 GMT expires: - '-1' pragma: @@ -459,67 +455,59 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-cidr - -o + - --resource-group --name --enable-managed-identity --service-principal --client-secret + --generate-ssh-keys -a --appgw-subnet-cidr -o User-Agent: - - python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.18 msrest_azure/0.6.3 azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python - AZURECLI/2.16.0 + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ - : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ - \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.18.10\",\n \"dnsPrefix\"\ - : \"cliakstest-clitest6hnh3rvi7-86501d\",\n \"fqdn\": \"cliakstest-clitest6hnh3rvi7-86501d-110abd56.hcp.westus2.staging.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.18.10\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2020.12.15\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdabawEfwOujYnckZRvvkrcqoR+c2bLuoiOddqujUWHu+fBTEwDd8nB0vBemdGLNHmo7B3qpXyq9pcplUaGYzCmRZtnYy35UOtCinMqyT3mIJshJA1cIw70nFJbr2gvDl+XXtxmd59k5bWMUjzNdynurjhcA53b1fMHTFXSd5ugtbJ4SyZxPkNWxRtJ9Dg2RslMZ+3ZA9y8iAAMxnX85HpG1UMpwzvEM/jPoFd43UYB5TFZIRAcvlkZTQKaBtFW+Khg7Jx5C3iyPzSMAgDzS4WsJBCfABpJ8nnGzBEi/orhFydtkE/zsXOEMY8ppUpnBLN+LXD1gqWhEYRLF7atYd3\ - \ vsonline@c541134d8e01\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ - : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ - \ \"addonProfiles\": {\n \"KubeDashboard\": {\n \"enabled\": false,\n\ - \ \"config\": null\n },\n \"ingressApplicationGateway\": {\n \ - \ \"enabled\": true,\n \"config\": {\n \"effectiveApplicationGatewayId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\"\ - ,\n \"subnetCIDR\": \"10.2.0.0/16\"\n },\n \"identity\": {\n\ - \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ingressapplicationgateway-cliakstest000002\"\ - ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"\ - objectId\":\"00000000-0000-0000-0000-000000000001\"\n }\n }\n },\n\ - \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ - \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ - : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ - ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ - count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/a63a767f-cf8e-4cf5-8206-b008885d5d5b\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 10,\n \"identityProfile\": {\n \"kubeletidentity\":\ - \ {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ - ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ - :\"00000000-0000-0000-0000-000000000001\"\n }\n }\n },\n \"identity\"\ - : {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ - ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ - : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestyrifwz6ih-79a739\",\n + \ \"fqdn\": \"cliakstest-clitestyrifwz6ih-79a739-0a0ef6cf.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestyrifwz6ih-79a739-0a0ef6cf.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\",\n + \ \"subnetCIDR\": \"10.2.0.0/16\"\n }\n }\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/1c95174c-07c1-4d7f-a09b-24f1aa2b801e\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"disableLocalAccounts\": false\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '3916' + - '3230' content-type: - application/json date: - - Tue, 22 Dec 2020 17:30:23 GMT + - Thu, 10 Jun 2021 04:38:06 GMT expires: - '-1' pragma: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix.yaml index 1e0f9658745..08b15c6d2a1 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix.yaml @@ -11,18 +11,15 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) - accept-language: - - en-US + - AZURECLI/2.24.2 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2020-11-17T21:57:01Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-06-10T04:56:16Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -31,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Nov 2020 21:57:06 GMT + - Thu, 10 Jun 2021 04:56:20 GMT expires: - '-1' pragma: @@ -47,17 +44,18 @@ interactions: message: OK - request: body: '{"location": "westus2", "properties": {"kubernetesVersion": "", "dnsPrefix": - "cliakstest-clitestrkmef67b4-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": + "cliakstest-clitestmashuunhq-79a739", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": - "Delete", "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", - "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEvZOAiQi79CLB3LPrw6shgUuJAsmvPckoiDewIwdaFEFImMCn8UOc87QtruXAHLx6XQz3r6SH3STEobWw7I1aPVD1KuQBqUQwzqfL223UyA3BOm/mdpc77apIT1Pw4hDHtMwDwO01HMir/sRIcoavXphbcUh+H1bZ5WQQJwgS0jVptOhUjeuE9uiOVA+FzauAb91/QdE6zMfvq03bynVJja4Y81n2PlqlzMmIUUVUYnSoeFIYkUToZ07d0m76VY1ci91WrUFXKCv2iM5IPvyE2RTSlm7GKrR9fUJCa4YTqPNRNwGov5GpbeZqHQzvLnjRq3hl06WX5fG8ZXaU/Xbr"}]}}, - "servicePrincipalProfile": {"clientId": "00000000-0000-0000-0000-000000000001": - {"IngressApplicationGateway": {"enabled": true, "config": {"subnetCIDR": "10.2.0.0/16"}}}, - "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": - "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": - "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", - "loadBalancerSku": "standard"}}, "identity": {"type": "SystemAssigned"}}' + "Delete", "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\n"}]}}, "addonProfiles": {"ingressApplicationGateway": + {"enabled": true, "config": {"subnetCIDR": "10.2.0.0/16"}}}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": + "standard"}, "disableLocalAccounts": false}, "identity": {"type": "SystemAssigned"}}' headers: Accept: - application/json @@ -68,65 +66,67 @@ interactions: Connection: - keep-alive Content-Length: - - '1346' + - '1415' Content-Type: - application/json; charset=utf-8 ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ - : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ - \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"dnsPrefix\"\ - : \"cliakstest-clitestrkmef67b4-8ecadf\",\n \"fqdn\": \"cliakstest-clitestrkmef67b4-8ecadf-50faf2ef.hcp.westus2.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEvZOAiQi79CLB3LPrw6shgUuJAsmvPckoiDewIwdaFEFImMCn8UOc87QtruXAHLx6XQz3r6SH3STEobWw7I1aPVD1KuQBqUQwzqfL223UyA3BOm/mdpc77apIT1Pw4hDHtMwDwO01HMir/sRIcoavXphbcUh+H1bZ5WQQJwgS0jVptOhUjeuE9uiOVA+FzauAb91/QdE6zMfvq03bynVJja4Y81n2PlqlzMmIUUVUYnSoeFIYkUToZ07d0m76VY1ci91WrUFXKCv2iM5IPvyE2RTSlm7GKrR9fUJCa4YTqPNRNwGov5GpbeZqHQzvLnjRq3hl06WX5fG8ZXaU/Xbr\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"msi\"\n },\n \"addonProfiles\": {\n \"KubeDashboard\"\ - : {\n \"enabled\": true,\n \"config\": null\n },\n \"ingressApplicationGateway\"\ - : {\n \"enabled\": true,\n \"config\": {\n \"effectiveApplicationGatewayId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\"\ - ,\n \"subnetCIDR\": \"10.2.0.0/16\"\n }\n }\n },\n \"nodeResourceGroup\"\ - : \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n\ - \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"\ - networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \ - \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\"\ - : 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\ - ,\n \"principalId\": \"7fdb921c-1435-4e8b-9982-175bad40d0d8\",\n \"tenantId\"\ - : \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ - : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestmashuunhq-79a739\",\n + \ \"fqdn\": \"cliakstest-clitestmashuunhq-79a739-83d56344.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestmashuunhq-79a739-83d56344.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\",\n + \ \"subnetCIDR\": \"10.2.0.0/16\"\n }\n }\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": + false\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 cache-control: - no-cache content-length: - - '2843' + - '3091' content-type: - application/json date: - - Tue, 17 Nov 2020 21:57:13 GMT + - Thu, 10 Jun 2021 04:56:33 GMT expires: - '-1' pragma: @@ -154,26 +154,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 21:57:44 GMT + - Thu, 10 Jun 2021 04:57:03 GMT expires: - '-1' pragma: @@ -203,26 +204,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 21:58:15 GMT + - Thu, 10 Jun 2021 04:57:35 GMT expires: - '-1' pragma: @@ -252,26 +254,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 21:58:45 GMT + - Thu, 10 Jun 2021 04:58:06 GMT expires: - '-1' pragma: @@ -301,26 +304,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 21:59:16 GMT + - Thu, 10 Jun 2021 04:58:38 GMT expires: - '-1' pragma: @@ -350,26 +354,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 21:59:47 GMT + - Thu, 10 Jun 2021 04:59:10 GMT expires: - '-1' pragma: @@ -399,26 +404,27 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '121' content-type: - application/json date: - - Tue, 17 Nov 2020 22:00:17 GMT + - Thu, 10 Jun 2021 04:59:41 GMT expires: - '-1' pragma: @@ -448,27 +454,28 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a4068349-b79b-4607-9df0-8de642a7cdad?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a55728c9-9063-498e-8e53-e273d7564b56?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"498306a4-9bb7-0746-9df0-8de642a7cdad\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2020-11-17T21:57:14.0743187Z\",\n \"\ - endTime\": \"2020-11-17T22:00:44.5843176Z\"\n }" + string: "{\n \"name\": \"c92857a5-6390-8e49-8e53-e273d7564b56\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-06-10T04:56:31.65Z\",\n \"endTime\": + \"2021-06-10T04:59:44.5932375Z\"\n }" headers: cache-control: - no-cache content-length: - - '170' + - '165' content-type: - application/json date: - - Tue, 17 Nov 2020 22:00:47 GMT + - Thu, 10 Jun 2021 05:00:12 GMT expires: - '-1' pragma: @@ -498,68 +505,66 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --enable-managed-identity --service-principal --client-secret - --generate-ssh-keys -a --appgw-subnet-prefix -o + - --resource-group --name --enable-managed-identity --generate-ssh-keys -a --appgw-subnet-prefix + -o User-Agent: - - python/3.6.10 (Linux-4.19.76-linuxkit-x86_64-with) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-containerservice/4.4.6 Azure-SDK-For-Python AZURECLI/2.15.0 (DOCKER) + - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.3 azure-mgmt-containerservice/11.0.0 Azure-SDK-For-Python + AZURECLI/2.24.2 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-05-01 response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ - : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ - \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.17.13\",\n \"dnsPrefix\"\ - : \"cliakstest-clitestrkmef67b4-8ecadf\",\n \"fqdn\": \"cliakstest-clitestrkmef67b4-8ecadf-50faf2ef.hcp.westus2.azmk8s.io\"\ - ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ - \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ - : 128,\n \"osDiskType\": \"Managed\",\n \"maxPods\": 110,\n \"\ - type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\"\ - ,\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ - : \"1.17.13\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\":\ - \ {},\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804-2021.01.06\"\n }\n ],\n \"linuxProfile\": {\n \ - \ \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\"\ - : [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEvZOAiQi79CLB3LPrw6shgUuJAsmvPckoiDewIwdaFEFImMCn8UOc87QtruXAHLx6XQz3r6SH3STEobWw7I1aPVD1KuQBqUQwzqfL223UyA3BOm/mdpc77apIT1Pw4hDHtMwDwO01HMir/sRIcoavXphbcUh+H1bZ5WQQJwgS0jVptOhUjeuE9uiOVA+FzauAb91/QdE6zMfvq03bynVJja4Y81n2PlqlzMmIUUVUYnSoeFIYkUToZ07d0m76VY1ci91WrUFXKCv2iM5IPvyE2RTSlm7GKrR9fUJCa4YTqPNRNwGov5GpbeZqHQzvLnjRq3hl06WX5fG8ZXaU/Xbr\"\ - \n }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"\ - clientId\": \"msi\"\n },\n \"addonProfiles\": {\n \"KubeDashboard\"\ - : {\n \"enabled\": true,\n \"config\": null,\n \"identity\": {\n\ - \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-cliakstest000002\"\ - ,\n \"clientId\": \"85ab3f86-43af-45ec-b541-a924911b3eeb\",\n \"\ - objectId\": \"fd593886-a8f5-4118-ab48-a52b33fa0868\"\n }\n },\n \ - \ \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\"\ - : {\n \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\"\ - ,\n \"subnetCIDR\": \"10.2.0.0/16\"\n },\n \"identity\": {\n\ - \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ingressapplicationgateway-cliakstest000002\"\ - ,\n \"clientId\": \"afb75efc-6446-4b03-a42b-4aeff546deea\",\n \"\ - objectId\": \"274fda10-e9a6-4b77-b188-1724d783addc\"\n }\n }\n },\n\ - \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ - \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ - : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ - ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ - count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/374cda9d-b2f9-4f08-9bbe-6e31a09ce930\"\ - \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ - : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ - : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"\ - maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\"\ - : {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ - ,\n \"clientId\": \"3cc882db-b914-493c-9fe3-0d45ccc43eb3\",\n \"objectId\"\ - : \"3a29b4c9-df1e-4ceb-9079-d23843da4b29\"\n }\n }\n },\n \"identity\"\ - : {\n \"type\": \"SystemAssigned\",\n \"principalId\": \"7fdb921c-1435-4e8b-9982-175bad40d0d8\"\ - ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ - : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.19.11\",\n \"dnsPrefix\": \"cliakstest-clitestmashuunhq-79a739\",\n + \ \"fqdn\": \"cliakstest-clitestmashuunhq-79a739-83d56344.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestmashuunhq-79a739-83d56344.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.19.11\",\n \"enableNodePublicIP\": false,\n \"nodeLabels\": {},\n + \ \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.05.19\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDDa7B9UAcZjiNXFbAWabU3ZJQsZv4CgsZK8jq+ZRCaJsErW/Lbi/pURsGaLmwn2Hn+zSHj5i4yhNmi3/l89lkvBuv6+sENFnrG5QzUr/9B3UaiwOGCKX6Z/SlC62fz+lAerbtB0ntHs0cTgdLCwAzNanpGqVUpTNkFrnDO2OjJF1SwqTVdyFRY7fCOvrXVXxcdrmMKGxDgihRCkEztaGjiyE5Rc5nHuti8CrfWl6V8tgG9oaRBJOJ4WkM7TT+S7B+XCUUWh8JUXH/KU6wIP47gvZ98KxL0WRFY/Dt+YnlknpvxS7u3fcP+RozpaZ1MIwibjec3ch8Evx8Z7RgaFwav + fumingzhang@microsoft.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/applicationgateway\",\n + \ \"subnetCIDR\": \"10.2.0.0/16\"\n },\n \"identity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ingressapplicationgateway-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/2f9aa9fc-82bf-45e2-b52e-b594f3b9f9b8\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '4254' + - '4134' content-type: - application/json date: - - Tue, 17 Nov 2020 22:00:48 GMT + - Thu, 10 Jun 2021 05:00:14 GMT expires: - '-1' pragma: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index efb06b5e1eb..4305b008b77 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -195,7 +195,7 @@ def test_aks_create_with_ingress_appgw_addon(self, resource_group, resource_grou 'name': aks_name }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys ' \ + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --generate-ssh-keys ' \ '-a ingress-appgw --appgw-subnet-cidr 10.2.0.0/16 -o json' self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), @@ -213,7 +213,7 @@ def test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix(self, 'name': aks_name }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys ' \ + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --generate-ssh-keys ' \ '-a ingress-appgw --appgw-subnet-prefix 10.2.0.0/16 -o json' self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), @@ -256,9 +256,9 @@ def test_aks_byo_subnet_with_ingress_appgw_addon(self, resource_group, resource_ }) # create aks cluster - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys ' \ + create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity --generate-ssh-keys ' \ '--vnet-subnet-id {vnet_id}/subnets/aks-subnet ' \ - '-a ingress-appgw --appgw-name gateway --appgw-subnet-id {vnet_id}/subnets/appgw-subnet -o json' + '-a ingress-appgw --appgw-name gateway --appgw-subnet-id {vnet_id}/subnets/appgw-subnet --yes -o json' aks_cluster = self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), self.check('addonProfiles.ingressApplicationGateway.enabled', True), @@ -330,9 +330,9 @@ def test_aks_byo_appgw_with_ingress_appgw_addon(self, resource_group, resource_g }) # create aks cluster - create_cmd = 'aks create -n {aks_name} -g {resource_group} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys ' \ + create_cmd = 'aks create -n {aks_name} -g {resource_group} --enable-managed-identity --generate-ssh-keys ' \ '--vnet-subnet-id {vnet_id}/subnets/aks-subnet ' \ - '-a ingress-appgw --appgw-id {appgw_id} -o json' + '-a ingress-appgw --appgw-id {appgw_id} --yes -o json' aks_cluster = self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), self.check('addonProfiles.ingressApplicationGateway.enabled', True), @@ -371,7 +371,7 @@ def test_aks_enable_addon_with_openservicemesh(self, resource_group, resource_gr 'name': aks_name, }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys -o json' + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --generate-ssh-keys -o json' self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), self.check('addonProfiles.openServiceMesh', None), @@ -392,7 +392,7 @@ def test_aks_disable_addon_openservicemesh(self, resource_group, resource_group_ 'name': aks_name, }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --service-principal xxxx --client-secret yyyy --generate-ssh-keys ' \ + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --generate-ssh-keys ' \ '-a open-service-mesh -o json' self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), @@ -666,7 +666,7 @@ def test_aks_create_with_virtual_node_addon(self, resource_group, resource_group # create aks cluster create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity --generate-ssh-keys ' \ '--vnet-subnet-id {vnet_id}/subnets/aks-subnet --network-plugin azure ' \ - '-a virtual-node --aci-subnet-name aci-subnet -o json' + '-a virtual-node --aci-subnet-name aci-subnet --yes -o json' aks_cluster = self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded'), self.check('addonProfiles.aciConnectorLinux.enabled', True), From 3a3e486462fd8041aa09f8a0172017cf5229a945 Mon Sep 17 00:00:00 2001 From: gal-ofir-ms <72738425+gal-ofir-ms@users.noreply.github.com> Date: Thu, 10 Jun 2021 13:17:35 +0300 Subject: [PATCH 24/37] [AKS] Revert azure defender addon changes from AKS-Preview (#3474) * Added azureDefender addon to aks-preview * added history.md note * Update src/aks-preview/HISTORY.md * Revert AzureDefender addon changes from AKS Preview * finalize revert aks azure defender addon changes * resolved comments * Trigger Build * Update src/aks-preview/azext_aks_preview/custom.py Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com> * Update setup.py * Update HISTORY.md * Update HISTORY.md * Update setup.py * Update HISTORY.md * Update HISTORY.md * Update setup.py Co-authored-by: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com> --- src/aks-preview/HISTORY.md | 4 ++++ src/aks-preview/azext_aks_preview/_consts.py | 5 ---- src/aks-preview/azext_aks_preview/_help.py | 7 ------ src/aks-preview/azext_aks_preview/custom.py | 24 ++++++++------------ src/aks-preview/setup.py | 2 +- 5 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 90ccfe7374d..fcc987c48e8 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -2,6 +2,10 @@ Release History =============== +0.5.19 ++++++ +* Remove azure-defender from list of available addons to install via `az aks enable-addons` command + 0.5.18 +++++ * Fix issue with node config not consuming logging settings diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 6d759a00d03..642e28fca36 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -64,12 +64,7 @@ CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME = "azureKeyvaultSecretsProvider" CONST_SECRET_ROTATION_ENABLED = "enableSecretRotation" -# Azure Defender addon configuration keys -CONST_AZURE_DEFENDER_ADDON_NAME = "azureDefender" -CONST_AZURE_DEFENDER_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID = CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID - ADDONS = { - 'azure-defender': CONST_AZURE_DEFENDER_ADDON_NAME, 'http_application_routing': CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME, 'monitoring': CONST_MONITORING_ADDON_NAME, 'virtual-node': CONST_VIRTUAL_NODE_ADDON_NAME, diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 14c0928f8d5..d07f22936e1 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -171,7 +171,6 @@ open-service-mesh - enable Open Service Mesh addon (PREVIEW). gitops - enable GitOps (PREVIEW). azure-keyvault-secrets-provider - enable Azure Keyvault Secrets Provider addon (PREVIEW). - azure-defender - enable Azure Defender addon (PREVIEW). - name: --disable-rbac type: bool short-summary: Disable Kubernetes Role-Based Access Control. @@ -386,7 +385,6 @@ text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-aad --enable-azure-rbac - name: Create a kubernetes cluster with a specific os-sku text: az aks create -g MyResourceGroup -n MyManagedCluster --os-sku Ubuntu - """.format(sp_cache=AKS_SERVICE_PRINCIPAL_CACHE) helps['aks scale'] = """ @@ -1037,8 +1035,6 @@ open-service-mesh - enable Open Service Mesh addon (PREVIEW). gitops - enable GitOps (PREVIEW). azure-keyvault-secrets-provider - enable Azure Keyvault Secrets Provider addon (PREVIEW). - azure-defender - enable Azure Defender addon (PREVIEW). - parameters: - name: --addons -a type: string @@ -1083,9 +1079,6 @@ - name: Enable open-service-mesh addon. text: az aks enable-addons --name MyManagedCluster --resource-group MyResourceGroup --addons open-service-mesh crafted: true - - name: Enable azure-defender addon with workspace resourceId. - text: az aks enable-addons --name MyManagedCluster --resource-group MyResourceGroup --addons azure-defender --workspace-resource-id WorkspaceResourceId - crafted: true """ helps['aks get-versions'] = """ diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 8cd80d9020d..6b2b27d7621 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -114,7 +114,6 @@ from ._consts import CONST_CONFCOM_ADDON_NAME, CONST_ACC_SGX_QUOTE_HELPER_ENABLED from ._consts import CONST_OPEN_SERVICE_MESH_ADDON_NAME from ._consts import CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, CONST_SECRET_ROTATION_ENABLED -from ._consts import CONST_AZURE_DEFENDER_ADDON_NAME, CONST_AZURE_DEFENDER_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID from ._consts import CONST_MANAGED_IDENTITY_OPERATOR_ROLE, CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID from ._consts import ADDONS from .maintenanceconfiguration import aks_maintenanceconfiguration_update_internal @@ -2408,7 +2407,7 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements enabled=True) addons.remove('kube-dashboard') # TODO: can we help the user find a workspace resource ID? - if 'monitoring' in addons or 'azure-defender' in addons: + if 'monitoring' in addons: if not workspace_resource_id: # use default workspace if exists else create default workspace workspace_resource_id = _ensure_default_log_analytics_workspace_for_monitoring( @@ -2416,16 +2415,13 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements workspace_resource_id = _sanitize_loganalytics_ws_resource_id(workspace_resource_id) - if 'monitoring' in addons: - addon_profiles[CONST_MONITORING_ADDON_NAME] = ManagedClusterAddonProfile(enabled=True, config={CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID: workspace_resource_id}) - addons.remove('monitoring') - if 'azure-defender' in addons: - addon_profiles[CONST_AZURE_DEFENDER_ADDON_NAME] = ManagedClusterAddonProfile(enabled=True, config={CONST_AZURE_DEFENDER_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID: workspace_resource_id}) - addons.remove('azure-defender') - # error out if '--enable-addons=monitoring/azure-defender' isn't set but workspace_resource_id is + addon_profiles[CONST_MONITORING_ADDON_NAME] = ManagedClusterAddonProfile(enabled=True, config={CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID: workspace_resource_id}) + addons.remove('monitoring') + + # error out if '--enable-addons=monitoring' isn't set but workspace_resource_id is elif workspace_resource_id: raise CLIError( - '"--workspace-resource-id" requires "--enable-addons [monitoring/azure-defender]".') + '"--workspace-resource-id" requires "--enable-addons monitoring".') if 'azure-policy' in addons: addon_profiles[CONST_AZURE_POLICY_ADDON_NAME] = ManagedClusterAddonProfile( enabled=True) @@ -3383,11 +3379,11 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements addon_profile = addon_profiles.get( addon, ManagedClusterAddonProfile(enabled=False)) # special config handling for certain addons - if addon in [CONST_MONITORING_ADDON_NAME, CONST_AZURE_DEFENDER_ADDON_NAME]: - logAnalyticsConstName = CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID if addon == CONST_MONITORING_ADDON_NAME else CONST_AZURE_DEFENDER_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID + if addon == CONST_MONITORING_ADDON_NAME: + logAnalyticsConstName = CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID if addon_profile.enabled: - raise CLIError(f'The {addon} addon is already enabled for this managed cluster.\n' - f'To change {addon} configuration, run "az aks disable-addons -a {addon}"' + raise CLIError('The monitoring addon is already enabled for this managed cluster.\n' + 'To change monitoring configuration, run "az aks disable-addons -a monitoring"' 'before enabling it again.') if not workspace_resource_id: workspace_resource_id = _ensure_default_log_analytics_workspace_for_monitoring( diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 372e8361295..b23e457def9 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.18" +VERSION = "0.5.19" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 1f5f39f5b9747d22da47c41080a85022639bd976 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Thu, 10 Jun 2021 19:16:57 +0800 Subject: [PATCH 25/37] [Release] Update index.json for extension [ aks-preview ] (#3489) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=941401 Last commit: https://github.com/Azure/azure-cli-extensions/commit/3a3e486462fd8041aa09f8a0172017cf5229a945 --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index beac124f029..ea75b333b3e 100644 --- a/src/index.json +++ b/src/index.json @@ -3089,6 +3089,49 @@ "version": "0.5.18" }, "sha256Digest": "5cdb117cd30f743c092131bf77e8a699ba4e62bdf7f60a987b5e04387a57ccec" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.19-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.19-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.19" + }, + "sha256Digest": "ea42777c9a90295667bc3dc2154f3f3c9f122f884fd7dea661d4948d81dc0b63" } ], "alertsmanagement": [ From 5105f47be56c4c868fe3c68c5441c52f976a7f26 Mon Sep 17 00:00:00 2001 From: Atsushi Yokohama Date: Fri, 11 Jun 2021 12:21:55 +0900 Subject: [PATCH 26/37] Fix installation command (#3449) --- src/cosmosdb-preview/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cosmosdb-preview/README.md b/src/cosmosdb-preview/README.md index 696a225f556..26a55fba89b 100644 --- a/src/cosmosdb-preview/README.md +++ b/src/cosmosdb-preview/README.md @@ -13,7 +13,7 @@ This package provides commands to Install this extension using the below CLI command ```sh -az extension add --name cosmodb-preview +az extension add --name cosmosdb-preview ``` ### Included Features ### From 46f8b52d64d8a91181307bad24824f3bb8ad266a Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Thu, 10 Jun 2021 20:22:20 -0700 Subject: [PATCH 27/37] [k8s-extension] Release v0.4.3 (#3491) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model * Stage Public Version of k8s-extension 0.2.0 for official release (#15) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model Co-authored-by: action@github.com * Remove custom pipelines file * Update extension description, remove private const * Update pipeline file * Disable refs docs * Update to include better create warning logs and remove update context (#20) * Update to include better create warning logs and remove update context * Remove help text for update * Fix spelling error * Update message * Fix k8s-extension conflict with private version * Fix style errors * Fix filename * add customization for microsoft.azureml.kubernetes (#23) * add customization for microsoft.azureml.kubernetes * Update release history Co-authored-by: Yue Yu Co-authored-by: jonathan-innis * Add E2E Testing from Separate branch into internal code (#26) * Add internal e2e testing * Change to testing folder * Inference CLI validation for Scoring FE (#24) * cli validation starter * added the call to the fe validation function * nodeport validation not required * test fix Co-authored-by: Jonathan Innis * legal warning added (#27) * Remove deprecated method logger.warn * Update k8s-custom-pipelines.yml for Azure Pipelines * Update k8s-custom-pipelines.yml for Azure Pipelines * Add Azure Defender to E2E testing (#28) * Add azure defender testing to e2e * Remove the debug flag * Add configuration testing * Fix pipeline failures * Make test script more intuitive * Remove parameter from testing * Fix wrong location for k8s config whl * Fix pip upgrade issue * Fix pip install upgrade issue * Fix pip install issue * delete resurce in testcase (#29) Co-authored-by: Yue Yu Co-authored-by: Jonathan Innis * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu Co-authored-by: jonathan-innis * Provider registration case insensitive * do not validate against scoring fe if inference is not enabled. (#33) * do not validate against scoring fe if inference is not enabled. * add inference enabled scenario * refine * increase sleeping time * fix Co-authored-by: Yue Yu Co-authored-by: Jonathan Innis * Add OSM as Public Preview Extension (#34) * Add OSM as public preview extension * Add osm testing * Add release train to tests * Fix failing osm test * Upgrade pip in integration testing * Remove ununsed import * Fix release train check in update * Parallelize E2E Testing (#36) * Add OSM as public preview extension * Add osm testing * Update test logic to parallelize * Fix test success checking * Parallelize extension testing * Better error checking logic * Fix azureml deletion * Fix private build (#40) * change amlk8s to amlarc (#42) Co-authored-by: Yue Yu * Servicebus client model changes (#44) * Servicebus client model changes * Fix testing script * Update history file and pipeline * Update min cli core version for track 2 updates * Read SSL cert and key from files (#38) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments Co-authored-by: Jonathan Innis * Upgrade release version * Liakaz/inference read ssl from file (#47) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments * fixed decode error * renamed the experimental param Co-authored-by: Jonathan Innis * Fix style issues (#51) * Fixed scoring fe related extension param names (#49) * fixed scoring fe related extension params * bug fix and style fixes * variable rename * fixed the error type * set cluster to prod by default * Remove unneeded files Co-authored-by: action@github.com Co-authored-by: yuyue9284 <15863499+yuyue9284@users.noreply.github.com> Co-authored-by: Yue Yu Co-authored-by: Lia Kazakova <58274127+liakaz@users.noreply.github.com> --- src/k8s-extension/HISTORY.rst | 5 + .../azext_k8s_extension/custom.py | 2 - .../partner_extensions/AzureMLKubernetes.py | 106 +++++++++++++----- .../partner_extensions/ContainerInsights.py | 4 +- .../data/azure_ml/cert_and_key_encoded.txt | 2 + .../tests/latest/data/azure_ml/test_cert.pem | 1 + .../tests/latest/data/azure_ml/test_key.pem | 1 + .../tests/latest/test_azureml_extension.py | 34 ++++++ .../latest/test_k8s_extension_scenario.py | 21 ++-- src/k8s-extension/setup.py | 2 +- 10 files changed, 132 insertions(+), 46 deletions(-) create mode 100644 src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/cert_and_key_encoded.txt create mode 100644 src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_cert.pem create mode 100644 src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_key.pem create mode 100644 src/k8s-extension/azext_k8s_extension/tests/latest/test_azureml_extension.py diff --git a/src/k8s-extension/HISTORY.rst b/src/k8s-extension/HISTORY.rst index 2fe8a591fb9..4a96664d562 100644 --- a/src/k8s-extension/HISTORY.rst +++ b/src/k8s-extension/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.4.3 +++++++++++++++++++ +* Add SSL support for AzureML + + 0.4.2 ++++++++++++++++++ diff --git a/src/k8s-extension/azext_k8s_extension/custom.py b/src/k8s-extension/azext_k8s_extension/custom.py index d07c0015792..504539179d1 100644 --- a/src/k8s-extension/azext_k8s_extension/custom.py +++ b/src/k8s-extension/azext_k8s_extension/custom.py @@ -8,8 +8,6 @@ import json from knack.log import get_logger -from msrestazure.azure_exceptions import CloudError - from azure.cli.core.azclierror import ResourceNotFoundError, MutuallyExclusiveArgumentError, \ InvalidArgumentValueError, CommandNotFoundError, RequiredArgumentMissingError from azure.cli.core.commands.client_factory import get_subscription_id diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureMLKubernetes.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureMLKubernetes.py index 3a2544a4e3b..bd49a164a3b 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureMLKubernetes.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureMLKubernetes.py @@ -4,6 +4,9 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=unused-argument +# pylint: disable=line-too-long +# pylint: disable=too-many-locals + import copy from hashlib import md5 from typing import Any, Dict, List, Tuple @@ -17,9 +20,7 @@ import azure.mgmt.storage.models import azure.mgmt.loganalytics import azure.mgmt.loganalytics.models -from ..vendored_sdks.models import ( - ExtensionInstance, ExtensionInstanceUpdate, Scope, ScopeCluster) -from azure.cli.core.azclierror import InvalidArgumentValueError +from azure.cli.core.azclierror import InvalidArgumentValueError, MutuallyExclusiveArgumentError from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id from azure.mgmt.resource.locks.models import ManagementLockObject from knack.log import get_logger @@ -27,12 +28,19 @@ from .._client_factory import cf_resources from .PartnerExtensionModel import PartnerExtensionModel +from ..vendored_sdks.models import ( + ExtensionInstance, + ExtensionInstanceUpdate, + Scope, + ScopeCluster +) logger = get_logger(__name__) resource_tag = {'created_by': 'Azure Arc-enabled ML'} +# pylint: disable=too-many-instance-attributes class AzureMLKubernetes(PartnerExtensionModel): def __init__(self): # constants for configuration settings. @@ -66,6 +74,14 @@ def __init__(self): self.SERVICE_BUS_JOB_STATE_TOPIC = 'jobstate-updatedby-computeprovider' self.SERVICE_BUS_JOB_STATE_SUB = 'compute-scheduler-jobstate' + # constants for enabling SSL in inference + self.sslKeyPemFile = 'sslKeyPemFile' + self.sslCertPemFile = 'sslCertPemFile' + self.allowInsecureConnections = 'allowInsecureConnections' + self.privateEndpointILB = 'privateEndpointILB' + self.privateEndpointNodeport = 'privateEndpointNodeport' + self.inferenceLoadBalancerHA = 'inferenceLoadBalancerHA' + # reference mapping self.reference_mapping = { self.RELAY_SERVER_CONNECTION_STRING: [self.RELAY_CONNECTION_STRING_KEY, self.RELAY_CONNECTION_STRING_DEPRECATED_KEY], @@ -151,7 +167,7 @@ def __validate_config(self, configuration_settings, configuration_protected_sett config_keys = configuration_settings.keys() config_protected_keys = configuration_protected_settings.keys() dup_keys = set(config_keys) & set(config_protected_keys) - if len(dup_keys) > 0: + if dup_keys: for key in dup_keys: logger.warning( 'Duplicate keys found in both configuration settings and configuration protected setttings: %s', key) @@ -168,6 +184,7 @@ def __validate_config(self, configuration_settings, configuration_protected_sett if enable_inference: logger.warning("The installed AzureML extension for AML inference is experimental and not covered by customer support. Please use with discretion.") self.__validate_scoring_fe_settings(configuration_settings, configuration_protected_settings) + self.__set_up_inference_ssl(configuration_settings, configuration_protected_settings) elif not (enable_training or enable_inference): raise InvalidArgumentValueError( "Please create Microsoft.AzureML.Kubernetes extension instance either " @@ -181,33 +198,63 @@ def __validate_config(self, configuration_settings, configuration_protected_sett configuration_protected_settings.pop(self.ENABLE_INFERENCE, None) def __validate_scoring_fe_settings(self, configuration_settings, configuration_protected_settings): - clusterPurpose = _get_value_from_config_protected_config( - 'clusterPurpose', configuration_settings, configuration_protected_settings) - if clusterPurpose and clusterPurpose not in ["DevTest", "FastProd"]: - raise InvalidArgumentValueError( - "Accepted values for '--configuration-settings clusterPurpose' " - "are 'DevTest' and 'FastProd'") - - feSslCert = _get_value_from_config_protected_config( - 'scoringFe.sslCert', configuration_settings, configuration_protected_settings) - sslKey = _get_value_from_config_protected_config( - 'scoringFe.sslKey', configuration_settings, configuration_protected_settings) + isTestCluster = _get_value_from_config_protected_config( + self.inferenceLoadBalancerHA, configuration_settings, configuration_protected_settings) + isTestCluster = str(isTestCluster).lower() == 'false' + if isTestCluster: + configuration_settings['clusterPurpose'] = 'DevTest' + else: + configuration_settings['clusterPurpose'] = 'FastProd' + feSslCertFile = configuration_protected_settings.get(self.sslCertPemFile) + feSslKeyFile = configuration_protected_settings.get(self.sslKeyPemFile) allowInsecureConnections = _get_value_from_config_protected_config( - 'allowInsecureConnections', configuration_settings, configuration_protected_settings) + self.allowInsecureConnections, configuration_settings, configuration_protected_settings) allowInsecureConnections = str(allowInsecureConnections).lower() == 'true' - if (not feSslCert or not sslKey) and not allowInsecureConnections: + if (not feSslCertFile or not feSslKeyFile) and not allowInsecureConnections: raise InvalidArgumentValueError( "Provide ssl certificate and key. " "Otherwise explicitly allow insecure connection by specifying " "'--configuration-settings allowInsecureConnections=true'") + feIsNodePort = _get_value_from_config_protected_config( + self.privateEndpointNodeport, configuration_settings, configuration_protected_settings) + feIsNodePort = str(feIsNodePort).lower() == 'true' feIsInternalLoadBalancer = _get_value_from_config_protected_config( - 'scoringFe.serviceType.internalLoadBalancer', configuration_settings, configuration_protected_settings) + self.privateEndpointILB, configuration_settings, configuration_protected_settings) feIsInternalLoadBalancer = str(feIsInternalLoadBalancer).lower() == 'true' - if feIsInternalLoadBalancer: + + if feIsNodePort and feIsInternalLoadBalancer: + raise MutuallyExclusiveArgumentError( + "Specify either privateEndpointNodeport=true or privateEndpointILB=true, but not both.") + elif feIsNodePort: + configuration_settings['scoringFe.serviceType.nodePort'] = feIsNodePort + elif feIsInternalLoadBalancer: + configuration_settings['scoringFe.serviceType.internalLoadBalancer'] = feIsInternalLoadBalancer logger.warning( 'Internal load balancer only supported on AKS and AKS Engine Clusters.') + def __set_up_inference_ssl(self, configuration_settings, configuration_protected_settings): + allowInsecureConnections = _get_value_from_config_protected_config( + self.allowInsecureConnections, configuration_settings, configuration_protected_settings) + allowInsecureConnections = str(allowInsecureConnections).lower() == 'true' + if not allowInsecureConnections: + import base64 + feSslCertFile = configuration_protected_settings.get(self.sslCertPemFile) + feSslKeyFile = configuration_protected_settings.get(self.sslKeyPemFile) + with open(feSslCertFile) as f: + cert_data = f.read() + cert_data_bytes = cert_data.encode("ascii") + ssl_cert = base64.b64encode(cert_data_bytes).decode() + configuration_protected_settings['scoringFe.sslCert'] = ssl_cert + with open(feSslKeyFile) as f: + key_data = f.read() + key_data_bytes = key_data.encode("ascii") + ssl_key = base64.b64encode(key_data_bytes).decode() + configuration_protected_settings['scoringFe.sslKey'] = ssl_key + else: + logger.warning( + 'SSL is not enabled. Allowing insecure connections to the deployed services.') + def __create_required_resource( self, cmd, configuration_settings, configuration_protected_settings, subscription_id, resource_group_name, cluster_name, cluster_location): @@ -222,9 +269,8 @@ def __create_required_resource( configuration_settings[self.AZURE_LOG_ANALYTICS_CUSTOMER_ID_KEY] = ws_costumer_id configuration_protected_settings[self.AZURE_LOG_ANALYTICS_CONNECTION_STRING] = shared_key - if not configuration_settings.get( - self.RELAY_SERVER_CONNECTION_STRING) and not configuration_protected_settings.get( - self.RELAY_SERVER_CONNECTION_STRING): + if not configuration_settings.get(self.RELAY_SERVER_CONNECTION_STRING) and \ + not configuration_protected_settings.get(self.RELAY_SERVER_CONNECTION_STRING): logger.info('==== BEGIN RELAY CREATION ====') relay_connection_string, hc_resource_id, hc_name = _get_relay_connection_str( cmd, subscription_id, resource_group_name, cluster_name, cluster_location, self.RELAY_HC_AUTH_NAME) @@ -233,9 +279,8 @@ def __create_required_resource( configuration_settings[self.HC_RESOURCE_ID_KEY] = hc_resource_id configuration_settings[self.RELAY_HC_NAME_KEY] = hc_name - if not configuration_settings.get( - self.SERVICE_BUS_CONNECTION_STRING) and not configuration_protected_settings.get( - self.SERVICE_BUS_CONNECTION_STRING): + if not configuration_settings.get(self.SERVICE_BUS_CONNECTION_STRING) and \ + not configuration_protected_settings.get(self.SERVICE_BUS_CONNECTION_STRING): logger.info('==== BEGIN SERVICE BUS CREATION ====') topic_sub_mapping = { self.SERVICE_BUS_COMPUTE_STATE_TOPIC: self.SERVICE_BUS_COMPUTE_STATE_SUB, @@ -252,7 +297,7 @@ def __create_required_resource( def _get_valid_name(input_name: str, suffix_len: int, max_len: int) -> str: normalized_str = ''.join(filter(str.isalnum, input_name)) - assert len(normalized_str) > 0, "normalized name empty" + assert normalized_str, "normalized name empty" if len(normalized_str) <= max_len: return normalized_str @@ -267,6 +312,7 @@ def _get_valid_name(input_name: str, suffix_len: int, max_len: int) -> str: return new_name +# pylint: disable=broad-except def _lock_resource(cmd, lock_scope, lock_level='CanNotDelete'): lock_client: azure.mgmt.resource.locks.ManagementLockClient = get_mgmt_service_client( cmd.cli_ctx, azure.mgmt.resource.locks.ManagementLockClient) @@ -275,14 +321,13 @@ def _lock_resource(cmd, lock_scope, lock_level='CanNotDelete'): try: lock_client.management_locks.create_or_update_by_scope( scope=lock_scope, lock_name='amlarc-resource-lock', parameters=lock_object) - except: + except Exception: # try to lock the resource if user has the owner privilege pass def _get_relay_connection_str( - cmd, subscription_id, resource_group_name, cluster_name, cluster_location, auth_rule_name) -> Tuple[ - str, str, str]: + cmd, subscription_id, resource_group_name, cluster_name, cluster_location, auth_rule_name) -> Tuple[str, str, str]: relay_client: azure.mgmt.relay.RelayManagementClient = get_mgmt_service_client( cmd.cli_ctx, azure.mgmt.relay.RelayManagementClient) @@ -370,8 +415,7 @@ def _get_service_bus_connection_string(cmd, subscription_id, resource_group_name def _get_log_analytics_ws_connection_string( - cmd, subscription_id, resource_group_name, cluster_name, cluster_location) -> Tuple[ - str, str]: + cmd, subscription_id, resource_group_name, cluster_name, cluster_location) -> Tuple[str, str]: log_analytics_ws_client: azure.mgmt.loganalytics.LogAnalyticsManagementClient = get_mgmt_service_client( cmd.cli_ctx, azure.mgmt.loganalytics.LogAnalyticsManagementClient) diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py index 3514122e391..e42f22199da 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py @@ -14,7 +14,6 @@ from azure.cli.core.commands import LongRunningOperation from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id from azure.cli.core.util import sdk_no_wait -from msrestazure.azure_exceptions import CloudError from msrestazure.tools import parse_resource_id, is_valid_resource_id from ..vendored_sdks.models import ExtensionInstance @@ -104,8 +103,7 @@ def _invoke_deployment(cmd, resource_group_name, deployment_name, template, para if cmd.supported_api_version(min_api='2019-10-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES): validation_poller = smc.begin_validate(resource_group_name, deployment_name, deployment) return LongRunningOperation(cmd.cli_ctx)(validation_poller) - else: - return smc.validate(resource_group_name, deployment_name, deployment) + return smc.validate(resource_group_name, deployment_name, deployment) return sdk_no_wait(no_wait, smc.begin_create_or_update, resource_group_name, deployment_name, deployment) diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/cert_and_key_encoded.txt b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/cert_and_key_encoded.txt new file mode 100644 index 00000000000..4c2cb46c832 --- /dev/null +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/cert_and_key_encoded.txt @@ -0,0 +1,2 @@ +dGVzdGNlcnQ= +dGVzdGtleQ== \ No newline at end of file diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_cert.pem b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_cert.pem new file mode 100644 index 00000000000..e7529e3fdea --- /dev/null +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_cert.pem @@ -0,0 +1 @@ +testcert \ No newline at end of file diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_key.pem b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_key.pem new file mode 100644 index 00000000000..7ef00201c75 --- /dev/null +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/data/azure_ml/test_key.pem @@ -0,0 +1 @@ +testkey \ No newline at end of file diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/test_azureml_extension.py b/src/k8s-extension/azext_k8s_extension/tests/latest/test_azureml_extension.py new file mode 100644 index 00000000000..8ddf4dfaef2 --- /dev/null +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/test_azureml_extension.py @@ -0,0 +1,34 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=protected-access + +import os +import unittest + +from azext_k8s_extension.partner_extensions.AzureMLKubernetes import AzureMLKubernetes + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +class TestAzureMlExtension(unittest.TestCase): + + def test_set_up_inference_ssl(self): + azremlk8sInstance = AzureMLKubernetes() + config = {'allowInsecureConnections': 'false'} + # read and encode dummy cert and key + sslKeyPemFile = os.path.join(TEST_DIR, 'data', 'azure_ml', 'test_key.pem') + sslCertPemFile = os.path.join(TEST_DIR, 'data', 'azure_ml', 'test_cert.pem') + protected_config = {'sslKeyPemFile': sslKeyPemFile, 'sslCertPemFile': sslCertPemFile} + azremlk8sInstance._AzureMLKubernetes__set_up_inference_ssl(config, protected_config) + self.assertTrue('scoringFe.sslCert' in protected_config) + self.assertTrue('scoringFe.sslKey' in protected_config) + encoded_cert_and_key_file = os.path.join(TEST_DIR, 'data', 'azure_ml', 'cert_and_key_encoded.txt') + with open(encoded_cert_and_key_file, "r") as text_file: + cert = text_file.readline().rstrip() + assert cert == protected_config['scoringFe.sslCert'] + key = text_file.readline() + assert key == protected_config['scoringFe.sslKey'] diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/test_k8s_extension_scenario.py b/src/k8s-extension/azext_k8s_extension/tests/latest/test_k8s_extension_scenario.py index 0e53c9e6691..010df2e3077 100644 --- a/src/k8s-extension/azext_k8s_extension/tests/latest/test_k8s_extension_scenario.py +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/test_k8s_extension_scenario.py @@ -3,9 +3,9 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import os -import unittest +# pylint: disable=line-too-long +import os from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, record_only) @@ -27,13 +27,16 @@ def test_k8s_extension(self): 'version': '0.1.0' }) - self.cmd('k8s-extension create -g {rg} -n {name} -c {cluster_name} --cluster-type {cluster_type} --extension-type {extension_type} --release-train {release_train} --version {version}', checks=[ - self.check('name', '{name}'), - self.check('releaseTrain', '{release_train}'), - self.check('version', '{version}'), - self.check('resourceGroup', '{rg}'), - self.check('extensionType', '{extension_type}') - ]) + self.cmd('k8s-extension create -g {rg} -n {name} -c {cluster_name} --cluster-type {cluster_type} ' + '--extension-type {extension_type} --release-train {release_train} --version {version}', + checks=[ + self.check('name', '{name}'), + self.check('releaseTrain', '{release_train}'), + self.check('version', '{version}'), + self.check('resourceGroup', '{rg}'), + self.check('extensionType', '{extension_type}') + ] + ) # Update is disabled for now # self.cmd('k8s-extension update -g {rg} -n {name} --tags foo=boo', checks=[ diff --git a/src/k8s-extension/setup.py b/src/k8s-extension/setup.py index 908ecc53009..7937b085006 100644 --- a/src/k8s-extension/setup.py +++ b/src/k8s-extension/setup.py @@ -32,7 +32,7 @@ # TODO: Add any additional SDK dependencies here DEPENDENCIES = [] -VERSION = "0.4.2" +VERSION = "0.4.3" with open('README.rst', 'r', encoding='utf-8') as f: README = f.read() From 9b9f988772be2e8346c81c96b7a73bd1bc4b415a Mon Sep 17 00:00:00 2001 From: kai ru <69238381+kairu-ms@users.noreply.github.com> Date: Tue, 15 Jun 2021 10:35:17 +0800 Subject: [PATCH 28/37] Update CODEOWNERS (#3497) --- .github/CODEOWNERS | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d8917604c31..f41169e2101 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ /linter_exclusions.yml @kairu-ms @fengzhou-msft -/src/index.json @fengzhou-msft @qwordy @houk-ms @kairu-ms @jsntcy @Juliehzl @jiasli @zhoxing-ms @evelyn-ys @msyyc @xfz11 @08nholloway +/src/index.json @fengzhou-msft @qwordy @houk-ms @kairu-ms @jsntcy @Juliehzl @jiasli @zhoxing-ms @evelyn-ys @xfz11 @08nholloway /src/footprint/ @jonunezd @Diego-Perez-Botero @@ -30,7 +30,7 @@ /src/dnc/ @alegal -/src/express-route-cross-connection/ @kairu-ms @msyyc +/src/express-route-cross-connection/ @kairu-ms @jsntcy /src/application-insights/ @alexeldeib @@ -42,11 +42,11 @@ /src/resource-graph/ @demyanenko @amirhbk @chiragg4u -/src/azure-firewall/ @kairu-ms @msyyc +/src/azure-firewall/ @kairu-ms @jsntcy -/src/virtual-network-tap/ @kairu-ms @msyyc +/src/virtual-network-tap/ @kairu-ms @jsntcy -/src/virtual-wan/ @kairu-ms @msyyc +/src/virtual-wan/ @kairu-ms @jsntcy /src/front-door/ @pichandwork @@ -72,7 +72,7 @@ /src/connectedmachine/ @farehar -/src/ip-group/ @msyyc +/src/ip-group/ @kairu-ms @jsntcy /src/connectedk8s/ @akashkeshari @alphaWizard @@ -84,7 +84,7 @@ /src/notification-hub/ @fengzhou-msft -/src/connection-monitor-preview/ @msyyc +/src/connection-monitor-preview/ @kairu-ms @jsntcy /src/support/ @mit2nil @shahbj79 @RudraSharma93Microsoft @@ -100,7 +100,7 @@ /src/storage-blob-preview/ @Juliehzl -/src/logic/ @jsntcy @msyyc @kairu +/src/logic/ @jsntcy @kairu /src/hardware-security-modules/ @bquantump @@ -136,7 +136,7 @@ /src/custom-providers/ @jsntcy -/src/costmanagement/ @msyyc +/src/costmanagement/ @kairu-ms @jsntcy /src/datafactory/ @qiaozha @fengzhou-msft @qwordy @@ -166,11 +166,11 @@ /src/securityinsight/ @houk-ms -/src/communication/ @msyyc +/src/communication/ @kairu-ms @jsntcy /src/automation/ @qwordy -/src/monitor-control-service/ @jsntcy @msyyc @kairu-ms +/src/monitor-control-service/ @jsntcy @kairu-ms /src/rdbms-connect/ @mjain2 @Juliehzl From 0b720b3a24b0a2983fa83d104ba7bcf087f9c49f Mon Sep 17 00:00:00 2001 From: "Kerwin(Kaihui) Sun" Date: Tue, 15 Jun 2021 17:12:19 +0800 Subject: [PATCH 29/37] [Azure Firewall] Fix not found create_or_update in azure-firewall (#3505) * fix not found create_or_update in azure-firewall * Update setup.py * Update HISTORY.rst --- src/azure-firewall/HISTORY.rst | 4 ++++ src/azure-firewall/azext_firewall/_util.py | 4 ++-- src/azure-firewall/azext_firewall/custom.py | 2 +- src/azure-firewall/setup.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/azure-firewall/HISTORY.rst b/src/azure-firewall/HISTORY.rst index 593e1dd40f4..d402ffdf4c9 100644 --- a/src/azure-firewall/HISTORY.rst +++ b/src/azure-firewall/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.11.0 +++++++ +* Fix issue: `create_or_update` not found + 0.10.0 ++++++ * `az network firewall create`: Add new parameter `--tier` diff --git a/src/azure-firewall/azext_firewall/_util.py b/src/azure-firewall/azext_firewall/_util.py index adef06180bd..f25c522f6d6 100644 --- a/src/azure-firewall/azext_firewall/_util.py +++ b/src/azure-firewall/azext_firewall/_util.py @@ -66,9 +66,9 @@ def delete_func(cmd, resource_group_name, resource_name, item_name, no_wait=Fals [x for x in item.__getattribute__(prop) if x.name.lower() != item_name.lower()] _set_param(item, prop, keep_items) if no_wait: - sdk_no_wait(no_wait, client.create_or_update, resource_group_name, resource_name, item) + sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, resource_name, item) else: - result = sdk_no_wait(no_wait, client.create_or_update, resource_group_name, resource_name, item).result() + result = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, resource_name, item).result() if next((x for x in getattr(result, prop) if x.name.lower() == item_name.lower()), None): raise CLIError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) diff --git a/src/azure-firewall/azext_firewall/custom.py b/src/azure-firewall/azext_firewall/custom.py index aae784a9312..1c35f855353 100644 --- a/src/azure-firewall/azext_firewall/custom.py +++ b/src/azure-firewall/azext_firewall/custom.py @@ -324,7 +324,7 @@ def delete_func(cmd, resource_group_name, firewall_name, collection_name, item_n af = client.get(resource_group_name, firewall_name) collection = _find_item_at_path(af, '{}.{}'.format(collection_param_name, collection_name)) collection.rules = [rule for rule in collection.rules if rule.name != item_name] - client.create_or_update(resource_group_name, firewall_name, af) + client.begin_create_or_update(resource_group_name, firewall_name, af) func_name = 'delete_af_{}'.format(item_param_name) setattr(sys.modules[__name__], func_name, delete_func) diff --git a/src/azure-firewall/setup.py b/src/azure-firewall/setup.py index 4d6053a1b29..9e6e1862340 100644 --- a/src/azure-firewall/setup.py +++ b/src/azure-firewall/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "0.10.0" +VERSION = "0.11.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From b74e4ab51066677bdb38ac9232dbac4882c2b0c3 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Tue, 15 Jun 2021 17:28:43 +0800 Subject: [PATCH 30/37] [Release] Update index.json for extension [ azure-firewall ] (#3508) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=947610 Last commit: https://github.com/Azure/azure-cli-extensions/commit/0b720b3a24b0a2983fa83d104ba7bcf087f9c49f --- src/index.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/index.json b/src/index.json index ea75b333b3e..f12ce798f8e 100644 --- a/src/index.json +++ b/src/index.json @@ -5245,6 +5245,51 @@ "version": "0.10.0" }, "sha256Digest": "94c5b15b65b3fe78fa4a10b839ace1a5eb627e87f4aae2bc5728e159388c9599" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/azure_firewall-0.11.0-py2.py3-none-any.whl", + "filename": "azure_firewall-0.11.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/azure-firewall" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "azure-firewall", + "summary": "Manage Azure Firewall resources.", + "version": "0.11.0" + }, + "sha256Digest": "31100b4d554939502454bf9dbe0a42e2ee4319a1af3f9c93c9b51200bb547707" } ], "azure-iot": [ From d3de3956f4ce5c9c0e6e40f31fcef8469d6bf1e7 Mon Sep 17 00:00:00 2001 From: Delora Bradish Date: Tue, 15 Jun 2021 18:49:57 -0400 Subject: [PATCH 31/37] [Reference TOC] fixed Azure service names (#3499) * fixed Azure service names * fixed Azure service names Co-authored-by: Delora Bradish --- src/service_name.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/service_name.json b/src/service_name.json index ab1de4b62e6..8cbaaf01704 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -11,7 +11,7 @@ }, { "Command": "az aks", - "AzureServiceName": "Azure Kubernetes Service", + "AzureServiceName": "Azure Kubernetes Service (AKS)", "URL": "https://docs.microsoft.com/azure/aks/" }, { @@ -71,7 +71,7 @@ }, { "Command": "az connectedk8s", - "AzureServiceName": "Azure Kubernetes Service", + "AzureServiceName": "Azure Kubernetes Service (AKS)", "URL": "https://docs.microsoft.com/azure/aks/" }, { @@ -181,7 +181,7 @@ }, { "Command": "az healthbot", - "AzureServiceName": "Azure Bot", + "AzureServiceName": "Azure Bot Service", "URL": "https://docs.microsoft.com/azure/bot-service/" }, { @@ -221,17 +221,17 @@ }, { "Command": "az k8s-configuration", - "AzureServiceName": "Azure Kubernetes Configuration Service", + "AzureServiceName": "Azure Kubernetes Service (AKS)", "URL": "https://docs.microsoft.com/en-us/azure/azure-arc/kubernetes/" }, { "Command": "az k8sconfiguration", - "AzureServiceName": "Azure Kubernetes Configuration Service", + "AzureServiceName": "Azure Kubernetes Service (AKS)", "URL": "https://docs.microsoft.com/en-us/azure/azure-arc/kubernetes/" }, { "Command": "az k8s-extension", - "AzureServiceName": "Azure Kubernetes Extension Service", + "AzureServiceName": "Azure Kubernetes Service (AKS)", "URL": "https://docs.microsoft.com/en-us/azure/azure-arc/kubernetes/" }, { @@ -371,7 +371,7 @@ }, { "Command": "az stack-hci", - "AzureServiceName": "Azure Stack HCI", + "AzureServiceName": "Azure Stack", "URL": "https://docs.microsoft.com/azure-stack/hci/" }, { @@ -406,7 +406,7 @@ }, { "Command": "az kusto", - "AzureServiceName": "Azure Data Explorer (Kusto)", + "AzureServiceName": "Azure Data Explorer", "URL": "https://docs.microsoft.com/azure/data-explorer/" }, { @@ -416,7 +416,7 @@ }, { "Command": "az connectedvmware", - "AzureServiceName": "Azure Arc for VMware PrivateCloud", + "AzureServiceName": "Azure Arc", "URL": "" }, { From e37867230293e0c0f30076135fa5f981eb8b65f9 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 16 Jun 2021 09:57:17 +0800 Subject: [PATCH 32/37] [Release] Update index.json for extension [ k8s-extension ] (#3493) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=943030 Last commit: https://github.com/Azure/azure-cli-extensions/commit/46f8b52d64d8a91181307bad24824f3bb8ad266a --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index f12ce798f8e..600bb19906a 100644 --- a/src/index.json +++ b/src/index.json @@ -12285,6 +12285,49 @@ "version": "0.4.2" }, "sha256Digest": "aabdf00aa0cabddb142ef829e487d1b33c716ad498a4eee29389fd889e1f30d1" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_extension-0.4.3-py3-none-any.whl", + "filename": "k8s_extension-0.4.3-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.24.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "k8s-extension", + "summary": "Microsoft Azure Command-Line Tools K8s-extension Extension", + "version": "0.4.3" + }, + "sha256Digest": "67dc73f1e12d5e0084963a73c4a8f4e3adc06785f3ab51c5e0ee1f801fbca0d4" } ], "k8sconfiguration": [ From cb599bfad5dcdfd055368d07b3c121f6e50a9b60 Mon Sep 17 00:00:00 2001 From: fenwickt <69487545+fenwickt@users.noreply.github.com> Date: Tue, 15 Jun 2021 19:02:06 -0700 Subject: [PATCH 33/37] Added back shared queries to resourcegraph extension (#3457) * generated vendored_sdk with shared queries and added back shared queries logic * changed api version to 2018 for shared queries generated sdk * updated history and metadata * Trigger Build * trigger build again * missed new line at end of file * typo * reverted isPreview to false Co-authored-by: makharch --- src/resource-graph/HISTORY.rst | 5 + src/resource-graph/README.md | 34 + .../azext_resourcegraph/__init__.py | 2 +- .../azext_resourcegraph/_client_factory.py | 6 +- .../azext_resourcegraph/_help.py | 38 + .../azext_resourcegraph/_params.py | 9 + .../azext_resourcegraph/azext_metadata.json | 2 +- .../azext_resourcegraph/commands.py | 16 +- .../azext_resourcegraph/custom.py | 15 +- .../test_shared_query_scenario.yaml | 262 ++++++ .../latest/test_resourcegraph_commands.py | 32 + .../resourcegraph/_configuration.py | 7 +- .../resourcegraph/_metadata.json | 110 +++ .../resourcegraph/_resource_graph_client.py | 11 +- .../vendored_sdks/resourcegraph/_version.py | 2 +- .../resourcegraph/aio/_configuration.py | 7 +- .../aio/_resource_graph_client.py | 11 +- .../resourcegraph/aio/operations/__init__.py | 2 + .../aio/operations/_graph_query_operations.py | 362 +++++++++ .../_resource_graph_client_operations.py | 167 +++- .../resourcegraph/models/__init__.py | 64 ++ .../resourcegraph/models/_models.py | 674 ++++++++++++++++ .../resourcegraph/models/_models_py3.py | 757 ++++++++++++++++++ .../models/_resource_graph_client_enums.py | 34 + .../resourcegraph/operations/__init__.py | 2 + .../operations/_graph_query_operations.py | 371 +++++++++ .../_resource_graph_client_operations.py | 170 +++- .../vendored_sdks/resourcegraph/py.typed | 1 + src/resource-graph/setup.py | 2 +- 29 files changed, 3156 insertions(+), 19 deletions(-) create mode 100644 src/resource-graph/azext_resourcegraph/tests/latest/recordings/test_shared_query_scenario.yaml create mode 100644 src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_metadata.json create mode 100644 src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_graph_query_operations.py create mode 100644 src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_graph_query_operations.py create mode 100644 src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/py.typed diff --git a/src/resource-graph/HISTORY.rst b/src/resource-graph/HISTORY.rst index 665c0d00304..e9198302c69 100644 --- a/src/resource-graph/HISTORY.rst +++ b/src/resource-graph/HISTORY.rst @@ -1,3 +1,8 @@ +2.1.0 +++++++++++++++++++ + +* Added back shared queries support. + 2.0.0 ++++++++++++++++++ diff --git a/src/resource-graph/README.md b/src/resource-graph/README.md index a3412d7d9d4..4a2d8843f97 100644 --- a/src/resource-graph/README.md +++ b/src/resource-graph/README.md @@ -9,6 +9,40 @@ az extension add --name resoure-graph ``` ### Included Features +#### Resource Graph Shared Query Management: +*Examples:* + +##### Create a shared query + +``` +az graph shared-query create \ +-g MyResourceGroup \ +-n MySharedQuery \ +--query "project id, name, type, location, tags" \ +--description "AzureCliTest" +``` + +##### Show the properties of a shared query + +``` +az graph shared-query show \ +-g MyResourceGroup \ +-n MySharedQuery +``` + +##### Delete a shared query + +``` +az graph shared-query delete \ +-g MyResourceGroup \ +-n MySharedQuery +``` + +##### List all shared query in a resource group + +``` +az graph shared-query list -g MyResourceGroup +``` #### Resource Graph Query: *Examples:* diff --git a/src/resource-graph/azext_resourcegraph/__init__.py b/src/resource-graph/azext_resourcegraph/__init__.py index 794c2242585..38b670f555f 100644 --- a/src/resource-graph/azext_resourcegraph/__init__.py +++ b/src/resource-graph/azext_resourcegraph/__init__.py @@ -17,7 +17,7 @@ def __init__(self, cli_ctx=None): client_factory=cf_resource_graph ) - super(ResourceGraphCommandsLoader, self).__init__( + super().__init__( cli_ctx=cli_ctx, custom_command_type=resource_graph_custom ) diff --git a/src/resource-graph/azext_resourcegraph/_client_factory.py b/src/resource-graph/azext_resourcegraph/_client_factory.py index aa7a2eefc89..159702fb80d 100644 --- a/src/resource-graph/azext_resourcegraph/_client_factory.py +++ b/src/resource-graph/azext_resourcegraph/_client_factory.py @@ -7,4 +7,8 @@ def cf_resource_graph(cli_ctx, _): from azure.cli.core.commands.client_factory import get_mgmt_service_client from .vendored_sdks.resourcegraph import ResourceGraphClient - return get_mgmt_service_client(cli_ctx, ResourceGraphClient, subscription_bound=False) + return get_mgmt_service_client(cli_ctx, ResourceGraphClient) + + +def cf_resource_graph_graph_query(cli_ctx, _): + return cf_resource_graph(cli_ctx, _).graph_query diff --git a/src/resource-graph/azext_resourcegraph/_help.py b/src/resource-graph/azext_resourcegraph/_help.py index 8d04c24e60c..9f356b61991 100644 --- a/src/resource-graph/azext_resourcegraph/_help.py +++ b/src/resource-graph/azext_resourcegraph/_help.py @@ -61,3 +61,41 @@ text: > az graph query -q "where type =~ "Microsoft.Compute" | project name, tags" --skip-token skip_token_value_from_previous_query_response """ + + +helps['graph shared-query'] = """ + type: group + short-summary: Manage shared query of Azure resource graph. +""" + + +helps['graph shared-query create'] = """ + type: command + short-summary: Create a shared query. + examples: + - name: Create a shared query requesting a subset of resource fields. + text: > + az graph shared-query create -g MyResourceGroup -n MySharedQuery -q "project id, name, type, location, tags" -d "requesting a subset of resource fields." --tags key=value +""" + + +helps['graph shared-query delete'] = """ + type: command + short-summary: Delete a shared query. +""" + + +helps['graph shared-query show'] = """ + type: command + short-summary: Show the properties of a shared query. +""" + + +helps['graph shared-query list'] = """ + type: command + short-summary: List all shared query in a resource group. + examples: + - name: List all shared query in a resource group. + text: > + az graph shared-query list -g MyResourceGroup +""" diff --git a/src/resource-graph/azext_resourcegraph/_params.py b/src/resource-graph/azext_resourcegraph/_params.py index 06cd2761a70..e708e86cfe8 100644 --- a/src/resource-graph/azext_resourcegraph/_params.py +++ b/src/resource-graph/azext_resourcegraph/_params.py @@ -8,6 +8,7 @@ from azure.cli.core.commands.parameters import get_generic_completion_list from azure.cli.core.commands.parameters import get_three_state_flag +from azure.cli.core.commands.parameters import tags_type _QUERY_EXAMPLES = [ '''summarize count()''', @@ -41,3 +42,11 @@ def load_arguments(self, _): c.argument('allow_partial_scopes', options_list=['--allow-partial-scopes', '-a'], arg_type=get_three_state_flag(), required=False, default=False, help='Indicates if query should succeed when only partial number of subscription underneath can be processed by server.') + + with self.argument_context('graph shared-query') as c: + c.argument('graph_query', options_list=['--graph-query', '--q', '-q'], + completer=get_generic_completion_list(_QUERY_EXAMPLES), help='Resource Graph query to execute.') + c.argument('resource_name', options_list=['--name', '-n'], help='Name of the graph shared query.') + c.argument('tags', tags_type) + c.argument('description', options_list=['-d', '--description'], help='Description of the graph shared query.') + c.ignore('location') diff --git a/src/resource-graph/azext_resourcegraph/azext_metadata.json b/src/resource-graph/azext_resourcegraph/azext_metadata.json index 82e8950c85c..1c87fecaed4 100644 --- a/src/resource-graph/azext_resourcegraph/azext_metadata.json +++ b/src/resource-graph/azext_resourcegraph/azext_metadata.json @@ -1,4 +1,4 @@ { - "azext.minCliCoreVersion": "2.21.0", + "azext.minCliCoreVersion": "2.22.0", "azext.isPreview": false } diff --git a/src/resource-graph/azext_resourcegraph/commands.py b/src/resource-graph/azext_resourcegraph/commands.py index 7bc35c7770a..b9dfc4e8ae2 100644 --- a/src/resource-graph/azext_resourcegraph/commands.py +++ b/src/resource-graph/azext_resourcegraph/commands.py @@ -4,16 +4,22 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.commands import CliCommandType -from ._client_factory import cf_resource_graph +from ._client_factory import cf_resource_graph, cf_resource_graph_graph_query from ._validators import validate_query_args def load_command_table(self, _): - graph_sdk = CliCommandType( - operations_tmpl='azext_resourcegraph.custom#{}', - client_factory=cf_resource_graph + graph_shared_query_sdk = CliCommandType( + operations_tmpl='azext_resourcegraph.vendored_sdks.resourcegraph.operations#GraphQueryOperations.{}', + client_factory=cf_resource_graph_graph_query ) - with self.command_group('graph', command_type=graph_sdk, client_factory=cf_resource_graph) as g: + with self.command_group('graph', client_factory=cf_resource_graph) as g: g.custom_command('query', 'execute_query', validator=validate_query_args) + + with self.command_group('graph shared-query', graph_shared_query_sdk, is_experimental=True) as g: + g.custom_command('create', 'create_shared_query') + g.command('list', 'list') + g.command('delete', 'delete') + g.show_command('show', 'get') diff --git a/src/resource-graph/azext_resourcegraph/custom.py b/src/resource-graph/azext_resourcegraph/custom.py index a458ce32aba..7796bad1549 100644 --- a/src/resource-graph/azext_resourcegraph/custom.py +++ b/src/resource-graph/azext_resourcegraph/custom.py @@ -31,7 +31,7 @@ def execute_query(client, graph_query, first, skip, subscriptions, management_groups, allow_partial_scopes, skip_token): - # type: (ResourceGraphClient, str, int, int, list[str], str) -> object + # type: (ResourceGraphClient, str, int, int, list[str], list[str], bool, str) -> object mgs_list = management_groups if mgs_list is not None and len(mgs_list) > __MANAGEMENT_GROUP_LIMIT: mgs_list = mgs_list[:__MANAGEMENT_GROUP_LIMIT] @@ -96,6 +96,19 @@ def execute_query(client, graph_query, first, skip, subscriptions, management_gr return result_dict +def create_shared_query(client, resource_group_name, + resource_name, description, + graph_query, location='global', tags=None): + from azext_resourcegraph.vendored_sdks.resourcegraph.models import GraphQueryResource + graph_shared_query = GraphQueryResource(description=description, + query=graph_query, + tags=tags, + location=location) + return client.graph_query.create_or_update(resource_group_name=resource_group_name, + resource_name=resource_name, + properties=graph_shared_query) + + def _get_cached_subscriptions(): # type: () -> list[str] diff --git a/src/resource-graph/azext_resourcegraph/tests/latest/recordings/test_shared_query_scenario.yaml b/src/resource-graph/azext_resourcegraph/tests/latest/recordings/test_shared_query_scenario.yaml new file mode 100644 index 00000000000..662df1b8465 --- /dev/null +++ b/src/resource-graph/azext_resourcegraph/tests/latest/recordings/test_shared_query_scenario.yaml @@ -0,0 +1,262 @@ +interactions: +- request: + body: '{"location": "global", "tags": {"a": "b"}, "properties": {"description": + "AzureCliTest", "query": "project id, name, type, location, tags"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - graph shared-query create + Connection: + - keep-alive + Content-Length: + - '140' + Content-Type: + - application/json + ParameterSetName: + - -g -n -q -d --tags + User-Agent: + - AZURECLI/2.21.0 azsdk-python-mgmt-resourcegraph/10.1.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ResourceGraph/queries/clitest000002?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"resultKind":"UnKnown","timeModified":"2021-06-09T07:20:29.179434Z","query":"project + id, name, type, location, tags","description":"AzureCliTest"},"type":"microsoft.resourcegraph/queries","location":"global","subscriptionId":"34e09169-36e2-4117-ae05-98b60ea39dc4","resourceGroup":"clitest.rg000001","name":"clitest000002","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.resourcegraph/queries/clitest000002","tags":{"a":"b"},"etag":"\"0700ff83-0000-0100-0000-60c06bbd0000\""}' + headers: + cache-control: + - no-cache + content-length: + - '683' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 09 Jun 2021 07:20:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-ratelimit-remaining-tenant-resource-requests: + - '1' + x-ms-user-quota-remaining: + - '1' + x-ms-user-quota-resets-after: + - 00:00:00 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - graph shared-query show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.21.0 azsdk-python-mgmt-resourcegraph/10.1.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ResourceGraph/queries/clitest000002?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"resultKind":"UnKnown","timeModified":"2021-06-09T07:20:29.179434Z","query":"project + id, name, type, location, tags","description":"AzureCliTest"},"type":"microsoft.resourcegraph/queries","location":"global","subscriptionId":"34e09169-36e2-4117-ae05-98b60ea39dc4","resourceGroup":"clitest.rg000001","name":"clitest000002","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.resourcegraph/queries/clitest000002","tags":{"a":"b"},"etag":"\"0700ff83-0000-0100-0000-60c06bbd0000\""}' + headers: + cache-control: + - no-cache + content-length: + - '683' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 09 Jun 2021 07:20:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-resource-requests: + - '1' + x-ms-user-quota-remaining: + - '1' + x-ms-user-quota-resets-after: + - 00:00:00 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - graph shared-query list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.21.0 azsdk-python-mgmt-resourcegraph/10.1.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ResourceGraph/queries?api-version=2018-09-01-preview + response: + body: + string: '{"value":[{"properties":{"resultKind":"UnKnown","timeModified":"2021-06-09T07:20:29.179434Z","query":"project + id, name, type, location, tags","description":"AzureCliTest"},"type":"microsoft.resourcegraph/queries","location":"global","subscriptionId":"34e09169-36e2-4117-ae05-98b60ea39dc4","resourceGroup":"clitest.rg000001","name":"clitest000002","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.resourcegraph/queries/clitest000002","tags":{"a":"b"},"etag":"\"0700ff83-0000-0100-0000-60c06bbd0000\""}]}' + headers: + cache-control: + - no-cache + content-length: + - '695' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 09 Jun 2021 07:20:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-resource-requests: + - '1' + x-ms-user-quota-remaining: + - '1' + x-ms-user-quota-resets-after: + - 00:00:00 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - graph shared-query delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.21.0 azsdk-python-mgmt-resourcegraph/10.1.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ResourceGraph/queries/clitest000002?api-version=2018-09-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 09 Jun 2021 07:20:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-ms-ratelimit-remaining-tenant-resource-requests: + - '1' + x-ms-user-quota-remaining: + - '1' + x-ms-user-quota-resets-after: + - 00:00:00 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - graph shared-query show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.21.0 azsdk-python-mgmt-resourcegraph/10.1.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ResourceGraph/queries/clitest000002?api-version=2018-09-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ResourceGraph/queries/clitest000002'' + under resource group ''clitest.rg000001'' was not found. For more details + please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '299' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 09 Jun 2021 07:20:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/resource-graph/azext_resourcegraph/tests/latest/test_resourcegraph_commands.py b/src/resource-graph/azext_resourcegraph/tests/latest/test_resourcegraph_commands.py index 3fb3fff5c0b..cf6d6d0554e 100644 --- a/src/resource-graph/azext_resourcegraph/tests/latest/test_resourcegraph_commands.py +++ b/src/resource-graph/azext_resourcegraph/tests/latest/test_resourcegraph_commands.py @@ -159,3 +159,35 @@ def test_query_error(self): self.assertTrue(len(error_response['details'][0]['code']) > 0) self.assertTrue(len(error_response['details'][0]['message']) > 0) self.assertTrue(len(error_response['details'][1]['additionalProperties']) == 4) + + @ResourceGroupPreparer(location='eastus') + def test_shared_query_scenario(self, resource_group): + self.kwargs.update({ + 'name': self.create_random_name('clitest', 20), + 'query': "project id, name, type, location, tags", + 'description': "AzureCliTest", + 'rg': resource_group + }) + + self.cmd('graph shared-query create -g {rg} -n {name} -q "{query}" -d {description} --tags a=b', checks=[ + self.check('location', 'global'), + self.check('name', '{name}'), + self.check('description', '{description}'), + self.check('query', '{query}') + ]) + + self.cmd('graph shared-query show -g {rg} -n {name}', checks=[ + self.check('location', 'global'), + self.check('name', '{name}'), + self.check('description', '{description}'), + self.check('query', '{query}') + ]) + + self.cmd('graph shared-query list -g {rg}', checks=[ + self.check('length(@)', 1) + ]) + + self.cmd('graph shared-query delete -g {rg} -n {name}') + + with self.assertRaises(SystemExit): + self.cmd('graph shared-query show -g {rg} -n {name}') \ No newline at end of file diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_configuration.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_configuration.py index 34697611acb..c883e46cc0e 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_configuration.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_configuration.py @@ -29,20 +29,25 @@ class ResourceGraphClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Azure subscription Id. + :type subscription_id: str """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str **kwargs # type: Any ): # type: (...) -> None if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(ResourceGraphClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2021-03-01" + self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-resourcegraph/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_metadata.json b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_metadata.json new file mode 100644 index 00000000000..6b4eca7d986 --- /dev/null +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_metadata.json @@ -0,0 +1,110 @@ +{ + "chosen_version": "", + "total_api_version_list": ["2018-09-01-preview", "2020-04-01-preview", "2020-09-01-preview", "2021-03-01"], + "client": { + "name": "ResourceGraphClient", + "filename": "_resource_graph_client", + "description": "Azure Resource Graph API Reference.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": true + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Azure subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Azure subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + "operations": "Operations", + "graph_query": "GraphQueryOperations" + }, + "operation_mixins": { + "resource_changes" : { + "sync": { + "signature": "def resource_changes(\n self,\n parameters, # type: \"_models.ResourceChangesRequestParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List changes to a resource for a given time interval.\n\n:param parameters: the parameters for this request for changes.\n:type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceChangeList, or the result of cls(response)\n:rtype: ~azure.mgmt.resourcegraph.models.ResourceChangeList\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def resource_changes(\n self,\n parameters: \"_models.ResourceChangesRequestParameters\",\n **kwargs\n) -\u003e \"_models.ResourceChangeList\":\n", + "doc": "\"\"\"List changes to a resource for a given time interval.\n\n:param parameters: the parameters for this request for changes.\n:type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceChangeList, or the result of cls(response)\n:rtype: ~azure.mgmt.resourcegraph.models.ResourceChangeList\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "resource_change_details" : { + "sync": { + "signature": "def resource_change_details(\n self,\n parameters, # type: \"_models.ResourceChangeDetailsRequestParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get resource change details.\n\n:param parameters: The parameters for this request for resource change details.\n:type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangeDetailsRequestParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of ResourceChangeData, or the result of cls(response)\n:rtype: list[~azure.mgmt.resourcegraph.models.ResourceChangeData]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def resource_change_details(\n self,\n parameters: \"_models.ResourceChangeDetailsRequestParameters\",\n **kwargs\n) -\u003e List[\"_models.ResourceChangeData\"]:\n", + "doc": "\"\"\"Get resource change details.\n\n:param parameters: The parameters for this request for resource change details.\n:type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangeDetailsRequestParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of ResourceChangeData, or the result of cls(response)\n:rtype: list[~azure.mgmt.resourcegraph.models.ResourceChangeData]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "resources" : { + "sync": { + "signature": "def resources(\n self,\n query, # type: \"_models.QueryRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Queries the resources managed by Azure Resource Manager for scopes specified in the request.\n\n:param query: Request specifying query and its options.\n:type query: ~azure.mgmt.resourcegraph.models.QueryRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: QueryResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.resourcegraph.models.QueryResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def resources(\n self,\n query: \"_models.QueryRequest\",\n **kwargs\n) -\u003e \"_models.QueryResponse\":\n", + "doc": "\"\"\"Queries the resources managed by Azure Resource Manager for scopes specified in the request.\n\n:param query: Request specifying query and its options.\n:type query: ~azure.mgmt.resourcegraph.models.QueryRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: QueryResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.resourcegraph.models.QueryResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "query" + }, + "resources_history" : { + "sync": { + "signature": "def resources_history(\n self,\n request, # type: \"_models.ResourcesHistoryRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all snapshots of a resource for a given time interval.\n\n:param request:\n:type request: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def resources_history(\n self,\n request: \"_models.ResourcesHistoryRequest\",\n **kwargs\n) -\u003e object:\n", + "doc": "\"\"\"List all snapshots of a resource for a given time interval.\n\n:param request:\n:type request: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "request" + } + }, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}" +} \ No newline at end of file diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_resource_graph_client.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_resource_graph_client.py index 3c33e71b2ec..cc07fe0aad8 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_resource_graph_client.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_resource_graph_client.py @@ -20,6 +20,7 @@ from ._configuration import ResourceGraphClientConfiguration from .operations import ResourceGraphClientOperationsMixin from .operations import Operations +from .operations import GraphQueryOperations from . import models @@ -28,30 +29,36 @@ class ResourceGraphClient(ResourceGraphClientOperationsMixin): :ivar operations: Operations operations :vartype operations: azure.mgmt.resourcegraph.operations.Operations + :ivar graph_query: GraphQueryOperations operations + :vartype graph_query: azure.mgmt.resourcegraph.operations.GraphQueryOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Azure subscription Id. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str base_url=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' - self._config = ResourceGraphClientConfiguration(credential, **kwargs) + self._config = ResourceGraphClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.graph_query = GraphQueryOperations( + self._client, self._config, self._serialize, self._deserialize) def close(self): # type: () -> None diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_version.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_version.py index 142a0420b39..c1257f7f4e1 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_version.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.0.0" +VERSION = "10.1.0" diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_configuration.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_configuration.py index 3f4f3e7ff3e..2d5c6b5e5ae 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_configuration.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_configuration.py @@ -27,19 +27,24 @@ class ResourceGraphClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Azure subscription Id. + :type subscription_id: str """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, **kwargs: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(ResourceGraphClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2021-03-01" + self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-resourcegraph/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_resource_graph_client.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_resource_graph_client.py index 6ee6002aabe..6e7e1328b17 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_resource_graph_client.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/_resource_graph_client.py @@ -18,6 +18,7 @@ from ._configuration import ResourceGraphClientConfiguration from .operations import ResourceGraphClientOperationsMixin from .operations import Operations +from .operations import GraphQueryOperations from .. import models @@ -26,29 +27,35 @@ class ResourceGraphClient(ResourceGraphClientOperationsMixin): :ivar operations: Operations operations :vartype operations: azure.mgmt.resourcegraph.aio.operations.Operations + :ivar graph_query: GraphQueryOperations operations + :vartype graph_query: azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Azure subscription Id. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: base_url = 'https://management.azure.com' - self._config = ResourceGraphClientConfiguration(credential, **kwargs) + self._config = ResourceGraphClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.graph_query = GraphQueryOperations( + self._client, self._config, self._serialize, self._deserialize) async def close(self) -> None: await self._client.close() diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/__init__.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/__init__.py index c0e10bc6448..21a67ce4dae 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/__init__.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/__init__.py @@ -8,8 +8,10 @@ from ._resource_graph_client_operations import ResourceGraphClientOperationsMixin from ._operations import Operations +from ._graph_query_operations import GraphQueryOperations __all__ = [ 'ResourceGraphClientOperationsMixin', 'Operations', + 'GraphQueryOperations', ] diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_graph_query_operations.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_graph_query_operations.py new file mode 100644 index 00000000000..3f937c41b76 --- /dev/null +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_graph_query_operations.py @@ -0,0 +1,362 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class GraphQueryOperations: + """GraphQueryOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.resourcegraph.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.GraphQueryListResult"]: + """Get all graph queries defined within a specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GraphQueryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resourcegraph.models.GraphQueryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('GraphQueryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.GraphQueryError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.GraphQueryResource": + """Get a single graph query by its resourceName. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + """Delete a graph query. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + properties: "_models.GraphQueryResource", + **kwargs + ) -> "_models.GraphQueryResource": + """Create a new graph query. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :param properties: Properties that need to be specified to create a new graph query. + :type properties: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'GraphQueryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + body: "_models.GraphQueryUpdateParameters", + **kwargs + ) -> "_models.GraphQueryResource": + """Updates a graph query that has already been added. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :param body: Properties that need to be specified to create a new graph query. + :type body: ~azure.mgmt.resourcegraph.models.GraphQueryUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'GraphQueryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_resource_graph_client_operations.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_resource_graph_client_operations.py index a692acd6157..ada2db38932 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_resource_graph_client_operations.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/aio/operations/_resource_graph_client_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,6 +20,116 @@ class ResourceGraphClientOperationsMixin: + async def resource_changes( + self, + parameters: "_models.ResourceChangesRequestParameters", + **kwargs + ) -> "_models.ResourceChangeList": + """List changes to a resource for a given time interval. + + :param parameters: the parameters for this request for changes. + :type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceChangeList, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.ResourceChangeList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceChangeList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resource_changes.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceChangesRequestParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceChangeList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resource_changes.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourceChanges'} # type: ignore + + async def resource_change_details( + self, + parameters: "_models.ResourceChangeDetailsRequestParameters", + **kwargs + ) -> List["_models.ResourceChangeData"]: + """Get resource change details. + + :param parameters: The parameters for this request for resource change details. + :type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangeDetailsRequestParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ResourceChangeData, or the result of cls(response) + :rtype: list[~azure.mgmt.resourcegraph.models.ResourceChangeData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ResourceChangeData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resource_change_details.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceChangeDetailsRequestParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ResourceChangeData]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resource_change_details.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourceChangeDetails'} # type: ignore + async def resources( self, query: "_models.QueryRequest", @@ -74,3 +184,58 @@ async def resources( return deserialized resources.metadata = {'url': '/providers/Microsoft.ResourceGraph/resources'} # type: ignore + + async def resources_history( + self, + request: "_models.ResourcesHistoryRequest", + **kwargs + ) -> object: + """List all snapshots of a resource for a given time interval. + + :param request: + :type request: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: object, or the result of cls(response) + :rtype: object + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-04-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resources_history.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'ResourcesHistoryRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resources_history.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourcesHistory'} # type: ignore diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/__init__.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/__init__.py index 12e73011181..fa87792c8fd 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/__init__.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/__init__.py @@ -8,65 +8,129 @@ try: from ._models_py3 import Column + from ._models_py3 import DateTimeInterval from ._models_py3 import Error from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorFieldContract from ._models_py3 import ErrorResponse from ._models_py3 import Facet from ._models_py3 import FacetError from ._models_py3 import FacetRequest from ._models_py3 import FacetRequestOptions from ._models_py3 import FacetResult + from ._models_py3 import GraphQueryError + from ._models_py3 import GraphQueryListResult + from ._models_py3 import GraphQueryResource + from ._models_py3 import GraphQueryUpdateParameters from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult from ._models_py3 import QueryRequest from ._models_py3 import QueryRequestOptions from ._models_py3 import QueryResponse + from ._models_py3 import Resource + from ._models_py3 import ResourceChangeData + from ._models_py3 import ResourceChangeDataAfterSnapshot + from ._models_py3 import ResourceChangeDataBeforeSnapshot + from ._models_py3 import ResourceChangeDetailsRequestParameters + from ._models_py3 import ResourceChangeList + from ._models_py3 import ResourceChangesRequestParameters + from ._models_py3 import ResourceChangesRequestParametersInterval + from ._models_py3 import ResourcePropertyChange + from ._models_py3 import ResourceSnapshotData + from ._models_py3 import ResourcesHistoryRequest + from ._models_py3 import ResourcesHistoryRequestOptions from ._models_py3 import Table except (SyntaxError, ImportError): from ._models import Column # type: ignore + from ._models import DateTimeInterval # type: ignore from ._models import Error # type: ignore from ._models import ErrorDetails # type: ignore + from ._models import ErrorFieldContract # type: ignore from ._models import ErrorResponse # type: ignore from ._models import Facet # type: ignore from ._models import FacetError # type: ignore from ._models import FacetRequest # type: ignore from ._models import FacetRequestOptions # type: ignore from ._models import FacetResult # type: ignore + from ._models import GraphQueryError # type: ignore + from ._models import GraphQueryListResult # type: ignore + from ._models import GraphQueryResource # type: ignore + from ._models import GraphQueryUpdateParameters # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore from ._models import QueryRequest # type: ignore from ._models import QueryRequestOptions # type: ignore from ._models import QueryResponse # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceChangeData # type: ignore + from ._models import ResourceChangeDataAfterSnapshot # type: ignore + from ._models import ResourceChangeDataBeforeSnapshot # type: ignore + from ._models import ResourceChangeDetailsRequestParameters # type: ignore + from ._models import ResourceChangeList # type: ignore + from ._models import ResourceChangesRequestParameters # type: ignore + from ._models import ResourceChangesRequestParametersInterval # type: ignore + from ._models import ResourcePropertyChange # type: ignore + from ._models import ResourceSnapshotData # type: ignore + from ._models import ResourcesHistoryRequest # type: ignore + from ._models import ResourcesHistoryRequestOptions # type: ignore from ._models import Table # type: ignore from ._resource_graph_client_enums import ( + ChangeCategory, + ChangeType, ColumnDataType, FacetSortOrder, + PropertyChangeType, + ResourcesHistoryRequestOptionsResultFormat, ResultFormat, + ResultKind, ResultTruncated, ) __all__ = [ 'Column', + 'DateTimeInterval', 'Error', 'ErrorDetails', + 'ErrorFieldContract', 'ErrorResponse', 'Facet', 'FacetError', 'FacetRequest', 'FacetRequestOptions', 'FacetResult', + 'GraphQueryError', + 'GraphQueryListResult', + 'GraphQueryResource', + 'GraphQueryUpdateParameters', 'Operation', 'OperationDisplay', 'OperationListResult', 'QueryRequest', 'QueryRequestOptions', 'QueryResponse', + 'Resource', + 'ResourceChangeData', + 'ResourceChangeDataAfterSnapshot', + 'ResourceChangeDataBeforeSnapshot', + 'ResourceChangeDetailsRequestParameters', + 'ResourceChangeList', + 'ResourceChangesRequestParameters', + 'ResourceChangesRequestParametersInterval', + 'ResourcePropertyChange', + 'ResourceSnapshotData', + 'ResourcesHistoryRequest', + 'ResourcesHistoryRequestOptions', 'Table', + 'ChangeCategory', + 'ChangeType', 'ColumnDataType', 'FacetSortOrder', + 'PropertyChangeType', + 'ResourcesHistoryRequestOptionsResultFormat', 'ResultFormat', + 'ResultKind', 'ResultTruncated', ] diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models.py index eece007579d..3e0f8b2f1c2 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models.py @@ -41,6 +41,40 @@ def __init__( self.type = kwargs['type'] +class DateTimeInterval(msrest.serialization.Model): + """An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. ``[start, end)``. + + All required parameters must be populated in order to send to Azure. + + :param start: Required. A datetime indicating the inclusive/closed start of the time interval, + i.e. ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically + after ``end`` will result in an error. + :type start: ~datetime.datetime + :param end: Required. A datetime indicating the exclusive/open end of the time interval, i.e. + ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before + ``start`` will result in an error. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DateTimeInterval, self).__init__(**kwargs) + self.start = kwargs['start'] + self.end = kwargs['end'] + + class Error(msrest.serialization.Model): """Error details. @@ -110,6 +144,33 @@ def __init__( self.message = kwargs['message'] +class ErrorFieldContract(msrest.serialization.Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + class ErrorResponse(msrest.serialization.Model): """An error response from the API. @@ -318,6 +379,206 @@ def __init__( self.data = kwargs['data'] +class GraphQueryError(msrest.serialization.Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status for the HTTP error + code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of validation error. + :type details: list[~azure.mgmt.resourcegraph.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphQueryError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class GraphQueryListResult(msrest.serialization.Model): + """Graph query list result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: URL to fetch the next set of queries. + :type next_link: str + :ivar value: An array of graph queries. + :vartype value: list[~azure.mgmt.resourcegraph.models.GraphQueryResource] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[GraphQueryResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphQueryListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None + + +class Resource(msrest.serialization.Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. This is GUID value. The display name should be assigned within + properties field. + :vartype name: str + :param location: The location of the resource. + :type location: str + :ivar type: Azure resource type. + :vartype type: str + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = kwargs.get('location', None) + self.type = None + self.etag = kwargs.get('etag', None) + self.tags = kwargs.get('tags', None) + + +class GraphQueryResource(Resource): + """Graph Query entity definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. This is GUID value. The display name should be assigned within + properties field. + :vartype name: str + :param location: The location of the resource. + :type location: str + :ivar type: Azure resource type. + :vartype type: str + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar time_modified: Date and time in UTC of the last modification that was made to this graph + query definition. + :vartype time_modified: ~datetime.datetime + :param description: The description of a graph query. + :type description: str + :param query: KQL query that will be graph. + :type query: str + :ivar result_kind: Enum indicating a type of graph query. Possible values include: "basic". + :vartype result_kind: str or ~azure.mgmt.resourcegraph.models.ResultKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time_modified': {'readonly': True}, + 'result_kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'result_kind': {'key': 'properties.resultKind', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphQueryResource, self).__init__(**kwargs) + self.time_modified = None + self.description = kwargs.get('description', None) + self.query = kwargs.get('query', None) + self.result_kind = None + + +class GraphQueryUpdateParameters(msrest.serialization.Model): + """The parameters that can be provided when updating workbook properties properties. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param description: The description of a graph query. + :type description: str + :param query: KQL query that will be graph. + :type query: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphQueryUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.etag = kwargs.get('etag', None) + self.description = kwargs.get('description', None) + self.query = kwargs.get('query', None) + + class Operation(msrest.serialization.Model): """Resource Graph REST API operation definition. @@ -535,6 +796,419 @@ def __init__( self.facets = kwargs.get('facets', None) +class ResourceChangeData(msrest.serialization.Model): + """Data on a specific change, represented by a pair of before and after resource snapshots. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource for a change. + :type resource_id: str + :param change_id: Required. The change ID. Valid and unique within the specified resource only. + :type change_id: str + :param before_snapshot: Required. The snapshot before the change. + :type before_snapshot: ~azure.mgmt.resourcegraph.models.ResourceSnapshotData + :param after_snapshot: Required. The snapshot after the change. + :type after_snapshot: ~azure.mgmt.resourcegraph.models.ResourceSnapshotData + :param change_type: The change type for snapshot. PropertyChanges will be provided in case of + Update change type. Possible values include: "Create", "Update", "Delete". + :type change_type: str or ~azure.mgmt.resourcegraph.models.ChangeType + :param property_changes: An array of resource property change. + :type property_changes: list[~azure.mgmt.resourcegraph.models.ResourcePropertyChange] + """ + + _validation = { + 'change_id': {'required': True}, + 'before_snapshot': {'required': True}, + 'after_snapshot': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'change_id': {'key': 'changeId', 'type': 'str'}, + 'before_snapshot': {'key': 'beforeSnapshot', 'type': 'ResourceSnapshotData'}, + 'after_snapshot': {'key': 'afterSnapshot', 'type': 'ResourceSnapshotData'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'property_changes': {'key': 'propertyChanges', 'type': '[ResourcePropertyChange]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangeData, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.change_id = kwargs['change_id'] + self.before_snapshot = kwargs['before_snapshot'] + self.after_snapshot = kwargs['after_snapshot'] + self.change_type = kwargs.get('change_type', None) + self.property_changes = kwargs.get('property_changes', None) + + +class ResourceSnapshotData(msrest.serialization.Model): + """Data on a specific resource snapshot. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSnapshotData, self).__init__(**kwargs) + self.snapshot_id = kwargs.get('snapshot_id', None) + self.timestamp = kwargs['timestamp'] + self.content = kwargs.get('content', None) + + +class ResourceChangeDataAfterSnapshot(ResourceSnapshotData): + """The snapshot after the change. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangeDataAfterSnapshot, self).__init__(**kwargs) + + +class ResourceChangeDataBeforeSnapshot(ResourceSnapshotData): + """The snapshot before the change. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangeDataBeforeSnapshot, self).__init__(**kwargs) + + +class ResourceChangeDetailsRequestParameters(msrest.serialization.Model): + """The parameters for a specific change details request. + + All required parameters must be populated in order to send to Azure. + + :param resource_ids: Required. Specifies the list of resources for a change details request. + :type resource_ids: list[str] + :param change_ids: Required. Specifies the list of change IDs for a change details request. + :type change_ids: list[str] + """ + + _validation = { + 'resource_ids': {'required': True}, + 'change_ids': {'required': True}, + } + + _attribute_map = { + 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, + 'change_ids': {'key': 'changeIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangeDetailsRequestParameters, self).__init__(**kwargs) + self.resource_ids = kwargs['resource_ids'] + self.change_ids = kwargs['change_ids'] + + +class ResourceChangeList(msrest.serialization.Model): + """A list of changes associated with a resource over a specific time interval. + + :param changes: The pageable value returned by the operation, i.e. a list of changes to the + resource. + + + * The list is ordered from the most recent changes to the least recent changes. + * This list will be empty if there were no changes during the requested interval. + * The ``Before`` snapshot timestamp value of the oldest change can be outside of the specified + time interval. + :type changes: list[~azure.mgmt.resourcegraph.models.ResourceChangeData] + :param skip_token: Skip token that encodes the skip information while executing the current + request. + :type skip_token: object + """ + + _attribute_map = { + 'changes': {'key': 'changes', 'type': '[ResourceChangeData]'}, + 'skip_token': {'key': '$skipToken', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangeList, self).__init__(**kwargs) + self.changes = kwargs.get('changes', None) + self.skip_token = kwargs.get('skip_token', None) + + +class ResourceChangesRequestParameters(msrest.serialization.Model): + """The parameters for a specific changes request. + + All required parameters must be populated in order to send to Azure. + + :param resource_ids: Specifies the list of resources for a changes request. + :type resource_ids: list[str] + :param subscription_id: The subscription id of resources to query the changes from. + :type subscription_id: str + :param interval: Required. Specifies the date and time interval for a changes request. + :type interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval + :param skip_token: Acts as the continuation token for paged responses. + :type skip_token: str + :param top: The maximum number of changes the client can accept in a paged response. + :type top: int + :param table: The table name to query resources from. + :type table: str + :param fetch_property_changes: The flag if set to true will fetch property changes. + :type fetch_property_changes: bool + :param fetch_snapshots: The flag if set to true will fetch change snapshots. + :type fetch_snapshots: bool + """ + + _validation = { + 'interval': {'required': True}, + 'top': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'DateTimeInterval'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'top': {'key': '$top', 'type': 'int'}, + 'table': {'key': 'table', 'type': 'str'}, + 'fetch_property_changes': {'key': 'fetchPropertyChanges', 'type': 'bool'}, + 'fetch_snapshots': {'key': 'fetchSnapshots', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangesRequestParameters, self).__init__(**kwargs) + self.resource_ids = kwargs.get('resource_ids', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.interval = kwargs['interval'] + self.skip_token = kwargs.get('skip_token', None) + self.top = kwargs.get('top', None) + self.table = kwargs.get('table', None) + self.fetch_property_changes = kwargs.get('fetch_property_changes', None) + self.fetch_snapshots = kwargs.get('fetch_snapshots', None) + + +class ResourceChangesRequestParametersInterval(DateTimeInterval): + """Specifies the date and time interval for a changes request. + + All required parameters must be populated in order to send to Azure. + + :param start: Required. A datetime indicating the inclusive/closed start of the time interval, + i.e. ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically + after ``end`` will result in an error. + :type start: ~datetime.datetime + :param end: Required. A datetime indicating the exclusive/open end of the time interval, i.e. + ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before + ``start`` will result in an error. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceChangesRequestParametersInterval, self).__init__(**kwargs) + + +class ResourcePropertyChange(msrest.serialization.Model): + """The resource property change. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The property name. + :type property_name: str + :param before_value: The property value in before snapshot. + :type before_value: str + :param after_value: The property value in after snapshot. + :type after_value: str + :param change_category: Required. The change category. Possible values include: "User", + "System". + :type change_category: str or ~azure.mgmt.resourcegraph.models.ChangeCategory + :param property_change_type: Required. The property change Type. Possible values include: + "Insert", "Update", "Remove". + :type property_change_type: str or ~azure.mgmt.resourcegraph.models.PropertyChangeType + """ + + _validation = { + 'property_name': {'required': True}, + 'change_category': {'required': True}, + 'property_change_type': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'propertyName', 'type': 'str'}, + 'before_value': {'key': 'beforeValue', 'type': 'str'}, + 'after_value': {'key': 'afterValue', 'type': 'str'}, + 'change_category': {'key': 'changeCategory', 'type': 'str'}, + 'property_change_type': {'key': 'propertyChangeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourcePropertyChange, self).__init__(**kwargs) + self.property_name = kwargs['property_name'] + self.before_value = kwargs.get('before_value', None) + self.after_value = kwargs.get('after_value', None) + self.change_category = kwargs['change_category'] + self.property_change_type = kwargs['property_change_type'] + + +class ResourcesHistoryRequest(msrest.serialization.Model): + """ResourcesHistoryRequest. + + :param subscriptions: + :type subscriptions: list[str] + :param query: + :type query: str + :param options: + :type options: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptions + :param management_group_id: + :type management_group_id: str + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + 'query': {'key': 'query', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'ResourcesHistoryRequestOptions'}, + 'management_group_id': {'key': 'managementGroupId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourcesHistoryRequest, self).__init__(**kwargs) + self.subscriptions = kwargs.get('subscriptions', None) + self.query = kwargs.get('query', None) + self.options = kwargs.get('options', None) + self.management_group_id = kwargs.get('management_group_id', None) + + +class ResourcesHistoryRequestOptions(msrest.serialization.Model): + """ResourcesHistoryRequestOptions. + + :param interval: An interval in time specifying the date and time for the inclusive start and + exclusive end, i.e. ``[start, end)``. + :type interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval + :param top: + :type top: int + :param skip: + :type skip: int + :param skip_token: + :type skip_token: str + :param result_format: Possible values include: "table", "objectArray". + :type result_format: str or + ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptionsResultFormat + """ + + _attribute_map = { + 'interval': {'key': 'interval', 'type': 'DateTimeInterval'}, + 'top': {'key': '$top', 'type': 'int'}, + 'skip': {'key': '$skip', 'type': 'int'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'result_format': {'key': 'resultFormat', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourcesHistoryRequestOptions, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.top = kwargs.get('top', None) + self.skip = kwargs.get('skip', None) + self.skip_token = kwargs.get('skip_token', None) + self.result_format = kwargs.get('result_format', None) + + class Table(msrest.serialization.Model): """Query output in tabular format. diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models_py3.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models_py3.py index 8cf22e7aaaa..9f2b419d30a 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models_py3.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_models_py3.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import datetime from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError @@ -48,6 +49,43 @@ def __init__( self.type = type +class DateTimeInterval(msrest.serialization.Model): + """An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. ``[start, end)``. + + All required parameters must be populated in order to send to Azure. + + :param start: Required. A datetime indicating the inclusive/closed start of the time interval, + i.e. ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically + after ``end`` will result in an error. + :type start: ~datetime.datetime + :param end: Required. A datetime indicating the exclusive/open end of the time interval, i.e. + ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before + ``start`` will result in an error. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + start: datetime.datetime, + end: datetime.datetime, + **kwargs + ): + super(DateTimeInterval, self).__init__(**kwargs) + self.start = start + self.end = end + + class Error(msrest.serialization.Model): """Error details. @@ -125,6 +163,37 @@ def __init__( self.message = message +class ErrorFieldContract(msrest.serialization.Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + **kwargs + ): + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + class ErrorResponse(msrest.serialization.Model): """An error response from the API. @@ -353,6 +422,227 @@ def __init__( self.data = data +class GraphQueryError(msrest.serialization.Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status for the HTTP error + code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of validation error. + :type details: list[~azure.mgmt.resourcegraph.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + details: Optional[List["ErrorFieldContract"]] = None, + **kwargs + ): + super(GraphQueryError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class GraphQueryListResult(msrest.serialization.Model): + """Graph query list result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: URL to fetch the next set of queries. + :type next_link: str + :ivar value: An array of graph queries. + :vartype value: list[~azure.mgmt.resourcegraph.models.GraphQueryResource] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[GraphQueryResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(GraphQueryListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = None + + +class Resource(msrest.serialization.Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. This is GUID value. The display name should be assigned within + properties field. + :vartype name: str + :param location: The location of the resource. + :type location: str + :ivar type: Azure resource type. + :vartype type: str + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + etag: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = location + self.type = None + self.etag = etag + self.tags = tags + + +class GraphQueryResource(Resource): + """Graph Query entity definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. This is GUID value. The display name should be assigned within + properties field. + :vartype name: str + :param location: The location of the resource. + :type location: str + :ivar type: Azure resource type. + :vartype type: str + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar time_modified: Date and time in UTC of the last modification that was made to this graph + query definition. + :vartype time_modified: ~datetime.datetime + :param description: The description of a graph query. + :type description: str + :param query: KQL query that will be graph. + :type query: str + :ivar result_kind: Enum indicating a type of graph query. Possible values include: "basic". + :vartype result_kind: str or ~azure.mgmt.resourcegraph.models.ResultKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time_modified': {'readonly': True}, + 'result_kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + 'result_kind': {'key': 'properties.resultKind', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + etag: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + query: Optional[str] = None, + **kwargs + ): + super(GraphQueryResource, self).__init__(location=location, etag=etag, tags=tags, **kwargs) + self.time_modified = None + self.description = description + self.query = query + self.result_kind = None + + +class GraphQueryUpdateParameters(msrest.serialization.Model): + """The parameters that can be provided when updating workbook properties properties. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param etag: This will be used to handle Optimistic Concurrency. If not present, it will always + overwrite the existing resource without checking conflict. + :type etag: str + :param description: The description of a graph query. + :type description: str + :param query: KQL query that will be graph. + :type query: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'query': {'key': 'properties.query', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + etag: Optional[str] = None, + description: Optional[str] = None, + query: Optional[str] = None, + **kwargs + ): + super(GraphQueryUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.etag = etag + self.description = description + self.query = query + + class Operation(msrest.serialization.Model): """Resource Graph REST API operation definition. @@ -600,6 +890,473 @@ def __init__( self.facets = facets +class ResourceChangeData(msrest.serialization.Model): + """Data on a specific change, represented by a pair of before and after resource snapshots. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource for a change. + :type resource_id: str + :param change_id: Required. The change ID. Valid and unique within the specified resource only. + :type change_id: str + :param before_snapshot: Required. The snapshot before the change. + :type before_snapshot: ~azure.mgmt.resourcegraph.models.ResourceSnapshotData + :param after_snapshot: Required. The snapshot after the change. + :type after_snapshot: ~azure.mgmt.resourcegraph.models.ResourceSnapshotData + :param change_type: The change type for snapshot. PropertyChanges will be provided in case of + Update change type. Possible values include: "Create", "Update", "Delete". + :type change_type: str or ~azure.mgmt.resourcegraph.models.ChangeType + :param property_changes: An array of resource property change. + :type property_changes: list[~azure.mgmt.resourcegraph.models.ResourcePropertyChange] + """ + + _validation = { + 'change_id': {'required': True}, + 'before_snapshot': {'required': True}, + 'after_snapshot': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'change_id': {'key': 'changeId', 'type': 'str'}, + 'before_snapshot': {'key': 'beforeSnapshot', 'type': 'ResourceSnapshotData'}, + 'after_snapshot': {'key': 'afterSnapshot', 'type': 'ResourceSnapshotData'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'property_changes': {'key': 'propertyChanges', 'type': '[ResourcePropertyChange]'}, + } + + def __init__( + self, + *, + change_id: str, + before_snapshot: "ResourceSnapshotData", + after_snapshot: "ResourceSnapshotData", + resource_id: Optional[str] = None, + change_type: Optional[Union[str, "ChangeType"]] = None, + property_changes: Optional[List["ResourcePropertyChange"]] = None, + **kwargs + ): + super(ResourceChangeData, self).__init__(**kwargs) + self.resource_id = resource_id + self.change_id = change_id + self.before_snapshot = before_snapshot + self.after_snapshot = after_snapshot + self.change_type = change_type + self.property_changes = property_changes + + +class ResourceSnapshotData(msrest.serialization.Model): + """Data on a specific resource snapshot. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + *, + timestamp: datetime.datetime, + snapshot_id: Optional[str] = None, + content: Optional[object] = None, + **kwargs + ): + super(ResourceSnapshotData, self).__init__(**kwargs) + self.snapshot_id = snapshot_id + self.timestamp = timestamp + self.content = content + + +class ResourceChangeDataAfterSnapshot(ResourceSnapshotData): + """The snapshot after the change. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + *, + timestamp: datetime.datetime, + snapshot_id: Optional[str] = None, + content: Optional[object] = None, + **kwargs + ): + super(ResourceChangeDataAfterSnapshot, self).__init__(snapshot_id=snapshot_id, timestamp=timestamp, content=content, **kwargs) + + +class ResourceChangeDataBeforeSnapshot(ResourceSnapshotData): + """The snapshot before the change. + + All required parameters must be populated in order to send to Azure. + + :param snapshot_id: The ID of the snapshot. + :type snapshot_id: str + :param timestamp: Required. The time when the snapshot was created. + The snapshot timestamp provides an approximation as to when a modification to a resource was + detected. There can be a difference between the actual modification time and the detection + time. This is due to differences in how operations that modify a resource are processed, + versus how operation that record resource snapshots are processed. + :type timestamp: ~datetime.datetime + :param content: The resource snapshot content (in resourceChangeDetails response only). + :type content: object + """ + + _validation = { + 'timestamp': {'required': True}, + } + + _attribute_map = { + 'snapshot_id': {'key': 'snapshotId', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'object'}, + } + + def __init__( + self, + *, + timestamp: datetime.datetime, + snapshot_id: Optional[str] = None, + content: Optional[object] = None, + **kwargs + ): + super(ResourceChangeDataBeforeSnapshot, self).__init__(snapshot_id=snapshot_id, timestamp=timestamp, content=content, **kwargs) + + +class ResourceChangeDetailsRequestParameters(msrest.serialization.Model): + """The parameters for a specific change details request. + + All required parameters must be populated in order to send to Azure. + + :param resource_ids: Required. Specifies the list of resources for a change details request. + :type resource_ids: list[str] + :param change_ids: Required. Specifies the list of change IDs for a change details request. + :type change_ids: list[str] + """ + + _validation = { + 'resource_ids': {'required': True}, + 'change_ids': {'required': True}, + } + + _attribute_map = { + 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, + 'change_ids': {'key': 'changeIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + resource_ids: List[str], + change_ids: List[str], + **kwargs + ): + super(ResourceChangeDetailsRequestParameters, self).__init__(**kwargs) + self.resource_ids = resource_ids + self.change_ids = change_ids + + +class ResourceChangeList(msrest.serialization.Model): + """A list of changes associated with a resource over a specific time interval. + + :param changes: The pageable value returned by the operation, i.e. a list of changes to the + resource. + + + * The list is ordered from the most recent changes to the least recent changes. + * This list will be empty if there were no changes during the requested interval. + * The ``Before`` snapshot timestamp value of the oldest change can be outside of the specified + time interval. + :type changes: list[~azure.mgmt.resourcegraph.models.ResourceChangeData] + :param skip_token: Skip token that encodes the skip information while executing the current + request. + :type skip_token: object + """ + + _attribute_map = { + 'changes': {'key': 'changes', 'type': '[ResourceChangeData]'}, + 'skip_token': {'key': '$skipToken', 'type': 'object'}, + } + + def __init__( + self, + *, + changes: Optional[List["ResourceChangeData"]] = None, + skip_token: Optional[object] = None, + **kwargs + ): + super(ResourceChangeList, self).__init__(**kwargs) + self.changes = changes + self.skip_token = skip_token + + +class ResourceChangesRequestParameters(msrest.serialization.Model): + """The parameters for a specific changes request. + + All required parameters must be populated in order to send to Azure. + + :param resource_ids: Specifies the list of resources for a changes request. + :type resource_ids: list[str] + :param subscription_id: The subscription id of resources to query the changes from. + :type subscription_id: str + :param interval: Required. Specifies the date and time interval for a changes request. + :type interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval + :param skip_token: Acts as the continuation token for paged responses. + :type skip_token: str + :param top: The maximum number of changes the client can accept in a paged response. + :type top: int + :param table: The table name to query resources from. + :type table: str + :param fetch_property_changes: The flag if set to true will fetch property changes. + :type fetch_property_changes: bool + :param fetch_snapshots: The flag if set to true will fetch change snapshots. + :type fetch_snapshots: bool + """ + + _validation = { + 'interval': {'required': True}, + 'top': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'DateTimeInterval'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'top': {'key': '$top', 'type': 'int'}, + 'table': {'key': 'table', 'type': 'str'}, + 'fetch_property_changes': {'key': 'fetchPropertyChanges', 'type': 'bool'}, + 'fetch_snapshots': {'key': 'fetchSnapshots', 'type': 'bool'}, + } + + def __init__( + self, + *, + interval: "DateTimeInterval", + resource_ids: Optional[List[str]] = None, + subscription_id: Optional[str] = None, + skip_token: Optional[str] = None, + top: Optional[int] = None, + table: Optional[str] = None, + fetch_property_changes: Optional[bool] = None, + fetch_snapshots: Optional[bool] = None, + **kwargs + ): + super(ResourceChangesRequestParameters, self).__init__(**kwargs) + self.resource_ids = resource_ids + self.subscription_id = subscription_id + self.interval = interval + self.skip_token = skip_token + self.top = top + self.table = table + self.fetch_property_changes = fetch_property_changes + self.fetch_snapshots = fetch_snapshots + + +class ResourceChangesRequestParametersInterval(DateTimeInterval): + """Specifies the date and time interval for a changes request. + + All required parameters must be populated in order to send to Azure. + + :param start: Required. A datetime indicating the inclusive/closed start of the time interval, + i.e. ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically + after ``end`` will result in an error. + :type start: ~datetime.datetime + :param end: Required. A datetime indicating the exclusive/open end of the time interval, i.e. + ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before + ``start`` will result in an error. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + start: datetime.datetime, + end: datetime.datetime, + **kwargs + ): + super(ResourceChangesRequestParametersInterval, self).__init__(start=start, end=end, **kwargs) + + +class ResourcePropertyChange(msrest.serialization.Model): + """The resource property change. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The property name. + :type property_name: str + :param before_value: The property value in before snapshot. + :type before_value: str + :param after_value: The property value in after snapshot. + :type after_value: str + :param change_category: Required. The change category. Possible values include: "User", + "System". + :type change_category: str or ~azure.mgmt.resourcegraph.models.ChangeCategory + :param property_change_type: Required. The property change Type. Possible values include: + "Insert", "Update", "Remove". + :type property_change_type: str or ~azure.mgmt.resourcegraph.models.PropertyChangeType + """ + + _validation = { + 'property_name': {'required': True}, + 'change_category': {'required': True}, + 'property_change_type': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'propertyName', 'type': 'str'}, + 'before_value': {'key': 'beforeValue', 'type': 'str'}, + 'after_value': {'key': 'afterValue', 'type': 'str'}, + 'change_category': {'key': 'changeCategory', 'type': 'str'}, + 'property_change_type': {'key': 'propertyChangeType', 'type': 'str'}, + } + + def __init__( + self, + *, + property_name: str, + change_category: Union[str, "ChangeCategory"], + property_change_type: Union[str, "PropertyChangeType"], + before_value: Optional[str] = None, + after_value: Optional[str] = None, + **kwargs + ): + super(ResourcePropertyChange, self).__init__(**kwargs) + self.property_name = property_name + self.before_value = before_value + self.after_value = after_value + self.change_category = change_category + self.property_change_type = property_change_type + + +class ResourcesHistoryRequest(msrest.serialization.Model): + """ResourcesHistoryRequest. + + :param subscriptions: + :type subscriptions: list[str] + :param query: + :type query: str + :param options: + :type options: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptions + :param management_group_id: + :type management_group_id: str + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + 'query': {'key': 'query', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'ResourcesHistoryRequestOptions'}, + 'management_group_id': {'key': 'managementGroupId', 'type': 'str'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + query: Optional[str] = None, + options: Optional["ResourcesHistoryRequestOptions"] = None, + management_group_id: Optional[str] = None, + **kwargs + ): + super(ResourcesHistoryRequest, self).__init__(**kwargs) + self.subscriptions = subscriptions + self.query = query + self.options = options + self.management_group_id = management_group_id + + +class ResourcesHistoryRequestOptions(msrest.serialization.Model): + """ResourcesHistoryRequestOptions. + + :param interval: An interval in time specifying the date and time for the inclusive start and + exclusive end, i.e. ``[start, end)``. + :type interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval + :param top: + :type top: int + :param skip: + :type skip: int + :param skip_token: + :type skip_token: str + :param result_format: Possible values include: "table", "objectArray". + :type result_format: str or + ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptionsResultFormat + """ + + _attribute_map = { + 'interval': {'key': 'interval', 'type': 'DateTimeInterval'}, + 'top': {'key': '$top', 'type': 'int'}, + 'skip': {'key': '$skip', 'type': 'int'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'result_format': {'key': 'resultFormat', 'type': 'str'}, + } + + def __init__( + self, + *, + interval: Optional["DateTimeInterval"] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + skip_token: Optional[str] = None, + result_format: Optional[Union[str, "ResourcesHistoryRequestOptionsResultFormat"]] = None, + **kwargs + ): + super(ResourcesHistoryRequestOptions, self).__init__(**kwargs) + self.interval = interval + self.top = top + self.skip = skip + self.skip_token = skip_token + self.result_format = result_format + + class Table(msrest.serialization.Model): """Query output in tabular format. diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_resource_graph_client_enums.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_resource_graph_client_enums.py index f317d67a5ab..917bea73469 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_resource_graph_client_enums.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/models/_resource_graph_client_enums.py @@ -26,6 +26,21 @@ def __getattr__(cls, name): raise AttributeError(name) +class ChangeCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The change category. + """ + + USER = "User" + SYSTEM = "System" + +class ChangeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The change type for snapshot. PropertyChanges will be provided in case of Update change type + """ + + CREATE = "Create" + UPDATE = "Update" + DELETE = "Delete" + class ColumnDataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Data type of a column in a table. """ @@ -43,6 +58,19 @@ class FacetSortOrder(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ASC = "asc" DESC = "desc" +class PropertyChangeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The property change Type + """ + + INSERT = "Insert" + UPDATE = "Update" + REMOVE = "Remove" + +class ResourcesHistoryRequestOptionsResultFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + TABLE = "table" + OBJECT_ARRAY = "objectArray" + class ResultFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines in which format query result returned. """ @@ -50,6 +78,12 @@ class ResultFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TABLE = "table" OBJECT_ARRAY = "objectArray" +class ResultKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum indicating a type of graph query. + """ + + BASIC = "basic" + class ResultTruncated(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates whether the query results are truncated. """ diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/__init__.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/__init__.py index c0e10bc6448..21a67ce4dae 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/__init__.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/__init__.py @@ -8,8 +8,10 @@ from ._resource_graph_client_operations import ResourceGraphClientOperationsMixin from ._operations import Operations +from ._graph_query_operations import GraphQueryOperations __all__ = [ 'ResourceGraphClientOperationsMixin', 'Operations', + 'GraphQueryOperations', ] diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_graph_query_operations.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_graph_query_operations.py new file mode 100644 index 00000000000..59f6ed9dc07 --- /dev/null +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_graph_query_operations.py @@ -0,0 +1,371 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class GraphQueryOperations(object): + """GraphQueryOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.resourcegraph.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.GraphQueryListResult"] + """Get all graph queries defined within a specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GraphQueryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resourcegraph.models.GraphQueryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('GraphQueryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(_models.GraphQueryError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.GraphQueryResource" + """Get a single graph query by its resourceName. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a graph query. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + properties, # type: "_models.GraphQueryResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.GraphQueryResource" + """Create a new graph query. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :param properties: Properties that need to be specified to create a new graph query. + :type properties: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'GraphQueryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + resource_name, # type: str + body, # type: "_models.GraphQueryUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.GraphQueryResource" + """Updates a graph query that has already been added. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Graph Query resource. + :type resource_name: str + :param body: Properties that need to be specified to create a new graph query. + :type body: ~azure.mgmt.resourcegraph.models.GraphQueryUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GraphQueryResource, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.GraphQueryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GraphQueryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'GraphQueryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.GraphQueryError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GraphQueryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}'} # type: ignore diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_resource_graph_client_operations.py b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_resource_graph_client_operations.py index fd63e4b1e2e..71ada398b4d 100644 --- a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_resource_graph_client_operations.py +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/operations/_resource_graph_client_operations.py @@ -17,13 +17,125 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ResourceGraphClientOperationsMixin(object): + def resource_changes( + self, + parameters, # type: "_models.ResourceChangesRequestParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceChangeList" + """List changes to a resource for a given time interval. + + :param parameters: the parameters for this request for changes. + :type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceChangeList, or the result of cls(response) + :rtype: ~azure.mgmt.resourcegraph.models.ResourceChangeList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceChangeList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resource_changes.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceChangesRequestParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceChangeList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resource_changes.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourceChanges'} # type: ignore + + def resource_change_details( + self, + parameters, # type: "_models.ResourceChangeDetailsRequestParameters" + **kwargs # type: Any + ): + # type: (...) -> List["_models.ResourceChangeData"] + """Get resource change details. + + :param parameters: The parameters for this request for resource change details. + :type parameters: ~azure.mgmt.resourcegraph.models.ResourceChangeDetailsRequestParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ResourceChangeData, or the result of cls(response) + :rtype: list[~azure.mgmt.resourcegraph.models.ResourceChangeData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ResourceChangeData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resource_change_details.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceChangeDetailsRequestParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ResourceChangeData]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resource_change_details.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourceChangeDetails'} # type: ignore + def resources( self, query, # type: "_models.QueryRequest" @@ -79,3 +191,59 @@ def resources( return deserialized resources.metadata = {'url': '/providers/Microsoft.ResourceGraph/resources'} # type: ignore + + def resources_history( + self, + request, # type: "_models.ResourcesHistoryRequest" + **kwargs # type: Any + ): + # type: (...) -> object + """List all snapshots of a resource for a given time interval. + + :param request: + :type request: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: object, or the result of cls(response) + :rtype: object + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-04-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resources_history.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'ResourcesHistoryRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + resources_history.metadata = {'url': '/providers/Microsoft.ResourceGraph/resourcesHistory'} # type: ignore diff --git a/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/py.typed b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/resource-graph/azext_resourcegraph/vendored_sdks/resourcegraph/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/resource-graph/setup.py b/src/resource-graph/setup.py index 8e2544be9ec..c93be3ad9b1 100644 --- a/src/resource-graph/setup.py +++ b/src/resource-graph/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "2.0.0" +VERSION = "2.1.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 1d9329d80ee5cd4de6b3b4490b4ca52069889b38 Mon Sep 17 00:00:00 2001 From: Daeun Yim <69321306+DaeunYim@users.noreply.github.com> Date: Tue, 15 Jun 2021 19:13:13 -0700 Subject: [PATCH 34/37] [RDBMS-CONNECT] Track2 migration remove unused rdbms module (#3509) --- .../azext_rdbms_connect/__init__.py | 3 +- .../azext_rdbms_connect/_client_factory.py | 44 - .../azext_rdbms_connect/commands.py | 22 +- .../azext_rdbms_connect/custom.py | 1 + .../vendored_sdks/__init__.py | 1 - .../vendored_sdks/mariadb/__init__.py | 19 - .../vendored_sdks/mariadb/_configuration.py | 48 - .../mariadb/_maria_db_management_client.py | 144 -- .../vendored_sdks/mariadb/models/__init__.py | 213 -- .../_maria_db_management_client_enums.py | 100 - .../vendored_sdks/mariadb/models/_models.py | 2019 --------------- .../mariadb/models/_models_py3.py | 2019 --------------- .../mariadb/models/_paged_models.py | 196 -- .../mariadb/operations/__init__.py | 56 - .../operations/_advisors_operations.py | 178 -- .../_check_name_availability_operations.py | 105 - .../operations/_configurations_operations.py | 290 --- .../operations/_databases_operations.py | 376 --- .../operations/_firewall_rules_operations.py | 378 --- ...ation_based_performance_tier_operations.py | 110 - ...on_sessions_operation_status_operations.py | 103 - ...ended_action_sessions_result_operations.py | 112 - .../operations/_log_files_operations.py | 113 - .../_maria_db_management_client_operations.py | 110 - .../mariadb/operations/_operations.py | 91 - ...private_endpoint_connections_operations.py | 490 ---- .../_private_link_resources_operations.py | 178 -- .../operations/_query_texts_operations.py | 181 -- .../_recommended_actions_operations.py | 188 -- .../operations/_replicas_operations.py | 113 - ...rver_security_alert_policies_operations.py | 211 -- .../mariadb/operations/_servers_operations.py | 784 ------ .../_top_query_statistics_operations.py | 187 -- .../_virtual_network_rules_operations.py | 381 --- .../operations/_wait_statistics_operations.py | 185 -- .../vendored_sdks/mariadb/version.py | 13 - .../vendored_sdks/mysql/__init__.py | 19 - .../vendored_sdks/mysql/_configuration.py | 48 - .../mysql/_my_sql_management_client.py | 154 -- .../vendored_sdks/mysql/models/__init__.py | 235 -- .../vendored_sdks/mysql/models/_models.py | 2288 ----------------- .../vendored_sdks/mysql/models/_models_py3.py | 2288 ----------------- .../models/_my_sql_management_client_enums.py | 121 - .../mysql/models/_paged_models.py | 222 -- .../mysql/operations/__init__.py | 60 - .../mysql/operations/_advisors_operations.py | 178 -- .../_check_name_availability_operations.py | 105 - .../operations/_configurations_operations.py | 290 --- .../mysql/operations/_databases_operations.py | 376 --- .../operations/_firewall_rules_operations.py | 378 --- ...ation_based_performance_tier_operations.py | 110 - ...on_sessions_operation_status_operations.py | 103 - ...ended_action_sessions_result_operations.py | 112 - .../mysql/operations/_log_files_operations.py | 113 - .../_my_sql_management_client_operations.py | 110 - .../mysql/operations/_operations.py | 91 - ...private_endpoint_connections_operations.py | 490 ---- .../_private_link_resources_operations.py | 178 -- .../operations/_query_texts_operations.py | 181 -- .../_recommended_actions_operations.py | 188 -- .../mysql/operations/_replicas_operations.py | 113 - .../_server_administrators_operations.py | 364 --- .../operations/_server_keys_operations.py | 374 --- ...rver_security_alert_policies_operations.py | 211 -- .../mysql/operations/_servers_operations.py | 875 ------- .../_top_query_statistics_operations.py | 187 -- .../_virtual_network_rules_operations.py | 381 --- .../operations/_wait_statistics_operations.py | 185 -- .../vendored_sdks/mysql/version.py | 13 - .../mysql_flexibleservers/__init__.py | 19 - .../mysql_flexibleservers/_configuration.py | 48 - .../_my_sql_management_client.py | 94 - .../mysql_flexibleservers/models/__init__.py | 168 -- .../mysql_flexibleservers/models/_models.py | 1507 ----------- .../models/_models_py3.py | 1507 ----------- .../models/_my_sql_management_client_enums.py | 112 - .../models/_paged_models.py | 92 - .../operations/__init__.py | 34 - .../_check_name_availability_operations.py | 106 - ...virtual_network_subnet_usage_operations.py | 108 - .../operations/_configurations_operations.py | 290 --- .../operations/_databases_operations.py | 376 --- .../operations/_firewall_rules_operations.py | 378 --- ..._location_based_capabilities_operations.py | 109 - .../operations/_operations.py | 92 - .../operations/_replicas_operations.py | 113 - .../operations/_server_keys_operations.py | 373 --- .../operations/_servers_operations.py | 769 ------ .../mysql_flexibleservers/version.py | 13 - .../vendored_sdks/postgresql/__init__.py | 19 - .../postgresql/_configuration.py | 48 - .../_postgre_sql_management_client.py | 118 - .../postgresql/models/__init__.py | 195 -- .../postgresql/models/_models.py | 1858 ------------- .../postgresql/models/_models_py3.py | 1858 ------------- .../postgresql/models/_paged_models.py | 157 -- .../_postgre_sql_management_client_enums.py | 124 - .../postgresql/operations/__init__.py | 44 - .../_check_name_availability_operations.py | 105 - .../operations/_configurations_operations.py | 290 --- .../operations/_databases_operations.py | 376 --- .../operations/_firewall_rules_operations.py | 378 --- ...ation_based_performance_tier_operations.py | 110 - .../operations/_log_files_operations.py | 113 - .../postgresql/operations/_operations.py | 91 - ...private_endpoint_connections_operations.py | 490 ---- .../_private_link_resources_operations.py | 178 -- .../operations/_replicas_operations.py | 113 - .../_server_administrators_operations.py | 365 --- .../operations/_server_keys_operations.py | 375 --- ...rver_security_alert_policies_operations.py | 211 -- .../operations/_servers_operations.py | 607 ----- .../_virtual_network_rules_operations.py | 381 --- .../vendored_sdks/postgresql/version.py | 13 - .../postgresql_flexibleservers/__init__.py | 19 - .../_configuration.py | 48 - .../_postgre_sql_management_client.py | 79 - .../models/__init__.py | 148 -- .../models/_models.py | 1355 ---------- .../models/_models_py3.py | 1355 ---------- .../models/_paged_models.py | 66 - .../_postgre_sql_management_client_enums.py | 84 - .../operations/__init__.py | 28 - .../_check_name_availability_operations.py | 106 - .../operations/_configurations_operations.py | 291 --- .../operations/_firewall_rules_operations.py | 379 --- ..._location_based_capabilities_operations.py | 109 - .../operations/_operations.py | 92 - .../operations/_servers_operations.py | 768 ------ ...virtual_network_subnet_usage_operations.py | 108 - .../postgresql_flexibleservers/version.py | 13 - .../vendored_sdks/version.py | 8 - 132 files changed, 5 insertions(+), 40879 deletions(-) delete mode 100644 src/rdbms-connect/azext_rdbms_connect/_client_factory.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_configuration.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_maria_db_management_client.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_maria_db_management_client_enums.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models_py3.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_paged_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_advisors_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_check_name_availability_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_configurations_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_databases_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_firewall_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_performance_tier_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_log_files_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_maria_db_management_client_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_endpoint_connections_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_link_resources_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_query_texts_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_recommended_actions_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_replicas_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_server_security_alert_policies_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_servers_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_top_query_statistics_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_virtual_network_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_wait_statistics_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/version.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_configuration.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_my_sql_management_client.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models_py3.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_my_sql_management_client_enums.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_paged_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_advisors_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_check_name_availability_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_configurations_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_databases_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_firewall_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_performance_tier_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_result_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_log_files_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_my_sql_management_client_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_endpoint_connections_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_link_resources_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_query_texts_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_recommended_actions_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_replicas_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_administrators_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_keys_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_security_alert_policies_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_servers_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_top_query_statistics_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_virtual_network_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_wait_statistics_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/version.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_configuration.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_my_sql_management_client.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models_py3.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_my_sql_management_client_enums.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_paged_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_name_availability_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_configurations_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_databases_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_firewall_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_location_based_capabilities_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_replicas_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_server_keys_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_servers_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/version.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_configuration.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_postgre_sql_management_client.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models_py3.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_paged_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_postgre_sql_management_client_enums.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_check_name_availability_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_configurations_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_databases_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_firewall_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_location_based_performance_tier_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_log_files_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_endpoint_connections_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_link_resources_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_replicas_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_administrators_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_keys_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_security_alert_policies_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_servers_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_virtual_network_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/version.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_configuration.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_postgre_sql_management_client.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models_py3.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_paged_models.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/__init__.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_check_name_availability_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_configurations_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_firewall_rules_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_servers_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/version.py delete mode 100644 src/rdbms-connect/azext_rdbms_connect/vendored_sdks/version.py diff --git a/src/rdbms-connect/azext_rdbms_connect/__init__.py b/src/rdbms-connect/azext_rdbms_connect/__init__.py index c4cb17ffd58..0455f8070f2 100644 --- a/src/rdbms-connect/azext_rdbms_connect/__init__.py +++ b/src/rdbms-connect/azext_rdbms_connect/__init__.py @@ -13,8 +13,7 @@ def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType rdbms_connect_custom = CliCommandType( operations_tmpl='azext_rdbms_connect.custom#{}') - super(RdbmsConnectCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=rdbms_connect_custom) + super().__init__(cli_ctx=cli_ctx, custom_command_type=rdbms_connect_custom) def load_command_table(self, args): from azext_rdbms_connect.commands import load_command_table diff --git a/src/rdbms-connect/azext_rdbms_connect/_client_factory.py b/src/rdbms-connect/azext_rdbms_connect/_client_factory.py deleted file mode 100644 index 9395691a029..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/_client_factory.py +++ /dev/null @@ -1,44 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from azure.cli.core.commands.client_factory import get_mgmt_service_client - - -def get_mariadb_management_client(cli_ctx, **_): - from azure.mgmt.rdbms.mariadb import MariaDBManagementClient - - return get_mgmt_service_client(cli_ctx, MariaDBManagementClient) - - -def get_mysql_management_client(cli_ctx, **_): - from azure.mgmt.rdbms.mysql import MySQLManagementClient - - return get_mgmt_service_client(cli_ctx, MySQLManagementClient) - - -def get_mysql_flexible_management_client(cli_ctx, **_): - from azure.mgmt.rdbms.mysql_flexibleservers import MySQLManagementClient - - return get_mgmt_service_client(cli_ctx, MySQLManagementClient) - - -def get_postgresql_management_client(cli_ctx, **_): - from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient - - return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) - - -def get_postgresql_flexible_management_client(cli_ctx, **_): - from azure.mgmt.rdbms.postgresql_flexibleservers import PostgreSQLManagementClient - - return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) - - -def cf_mysql_flexible_location_capabilities(cli_ctx, _): - return get_mysql_flexible_management_client(cli_ctx).location_based_capabilities - - -def cf_postgres_flexible_location_capabilities(cli_ctx, _): - return get_postgresql_flexible_management_client(cli_ctx).location_based_capabilities diff --git a/src/rdbms-connect/azext_rdbms_connect/commands.py b/src/rdbms-connect/azext_rdbms_connect/commands.py index b1350388559..cddbb64a5f9 100644 --- a/src/rdbms-connect/azext_rdbms_connect/commands.py +++ b/src/rdbms-connect/azext_rdbms_connect/commands.py @@ -3,30 +3,14 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long -from azure.cli.core.commands import CliCommandType -from ._client_factory import cf_mysql_flexible_location_capabilities, cf_postgres_flexible_location_capabilities - +# pylint: disable=line-too-long def load_command_table(self, _): - mysql_flexible_location_capabilities_sdk = CliCommandType( - operations_tmpl='azext_rdbms_connect.vendored_sdks.operations#LocationBasedCapabilitiesOperations.{}', - client_factory=cf_mysql_flexible_location_capabilities - ) - - postgres_flexible_location_capabilities_sdk = CliCommandType( - operations_tmpl='azext_rdbms_connect.vendored_sdks.operations#LocationBasedCapabilitiesOperations.{}', - client_factory=cf_postgres_flexible_location_capabilities - ) - with self.command_group('mysql flexible-server', mysql_flexible_location_capabilities_sdk, - client_factory=cf_mysql_flexible_location_capabilities, - is_preview=True) as g: + with self.command_group('mysql flexible-server', is_preview=True) as g: g.custom_command('connect', 'connect_to_flexible_server_mysql') g.custom_command('execute', 'execute_flexible_server_mysql') - with self.command_group('postgres flexible-server', postgres_flexible_location_capabilities_sdk, - client_factory=cf_postgres_flexible_location_capabilities, - is_preview=True) as g: + with self.command_group('postgres flexible-server', is_preview=True) as g: g.custom_command('connect', 'connect_to_flexible_server_postgres') g.custom_command('execute', 'execute_flexible_server_postgres') diff --git a/src/rdbms-connect/azext_rdbms_connect/custom.py b/src/rdbms-connect/azext_rdbms_connect/custom.py index 6befae9640c..f07ceee543e 100644 --- a/src/rdbms-connect/azext_rdbms_connect/custom.py +++ b/src/rdbms-connect/azext_rdbms_connect/custom.py @@ -19,6 +19,7 @@ DEFAULT_PG_DB_NAME = 'postgres' +# pylint: disable=raise-missing-from def connect_to_flexible_server_mysql(cmd, server_name, administrator_login, administrator_login_password=None, database_name=None, interactive_mode=None, querytext=None): if querytext: diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/__init__.py deleted file mode 100644 index 7453650cb53..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__="0.0.1" \ No newline at end of file diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/__init__.py deleted file mode 100644 index 08f6c3faab2..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import MariaDBManagementClientConfiguration -from ._maria_db_management_client import MariaDBManagementClient -__all__ = ['MariaDBManagementClient', 'MariaDBManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_configuration.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_configuration.py deleted file mode 100644 index ae736f37839..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class MariaDBManagementClientConfiguration(AzureConfiguration): - """Configuration for MariaDBManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(MariaDBManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_maria_db_management_client.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_maria_db_management_client.py deleted file mode 100644 index 0790942aae8..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/_maria_db_management_client.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import MariaDBManagementClientConfiguration -from .operations import MariaDBManagementClientOperationsMixin -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import QueryTextsOperations -from .operations import TopQueryStatisticsOperations -from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations -from .operations import RecommendedActionsOperations -from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from .operations import LocationBasedRecommendedActionSessionsResultOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerSecurityAlertPoliciesOperations -from . import models - - -class MariaDBManagementClient(MariaDBManagementClientOperationsMixin, SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - - :ivar config: Configuration for client. - :vartype config: MariaDBManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations - :ivar replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.mariadb.operations.ReplicasOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations - :ivar log_files: LogFiles operations - :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTier operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations - :ivar query_texts: QueryTexts operations - :vartype query_texts: azure.mgmt.rdbms.mariadb.operations.QueryTextsOperations - :ivar top_query_statistics: TopQueryStatistics operations - :vartype top_query_statistics: azure.mgmt.rdbms.mariadb.operations.TopQueryStatisticsOperations - :ivar wait_statistics: WaitStatistics operations - :vartype wait_statistics: azure.mgmt.rdbms.mariadb.operations.WaitStatisticsOperations - :ivar advisors: Advisors operations - :vartype advisors: azure.mgmt.rdbms.mariadb.operations.AdvisorsOperations - :ivar recommended_actions: RecommendedActions operations - :vartype recommended_actions: azure.mgmt.rdbms.mariadb.operations.RecommendedActionsOperations - :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatus operations - :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations - :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResult operations - :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsResultOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.mariadb.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.rdbms.mariadb.operations.PrivateLinkResourcesOperations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url) - super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.query_texts = QueryTextsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.top_query_statistics = TopQueryStatisticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.wait_statistics = WaitStatisticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.advisors = AdvisorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.recommended_actions = RecommendedActionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/__init__.py deleted file mode 100644 index bf8d47cdd3a..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/__init__.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import Advisor - from ._models_py3 import AzureEntityResource - from ._models_py3 import Configuration - from ._models_py3 import Database - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import FirewallRule - from ._models_py3 import LogFile - from ._models_py3 import NameAvailability - from ._models_py3 import NameAvailabilityRequest - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import PerformanceTierProperties - from ._models_py3 import PerformanceTierServiceLevelObjectives - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointProperty - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourceProperties - from ._models_py3 import PrivateLinkServiceConnectionStateProperty - from ._models_py3 import ProxyResource - from ._models_py3 import QueryStatistic - from ._models_py3 import QueryText - from ._models_py3 import RecommendationAction - from ._models_py3 import RecommendationActionsResultList - from ._models_py3 import RecommendedActionSessionsOperationStatus - from ._models_py3 import Resource - from ._models_py3 import Server - from ._models_py3 import ServerForCreate - from ._models_py3 import ServerPrivateEndpointConnection - from ._models_py3 import ServerPrivateEndpointConnectionProperties - from ._models_py3 import ServerPrivateLinkServiceConnectionStateProperty - from ._models_py3 import ServerPropertiesForCreate - from ._models_py3 import ServerPropertiesForDefaultCreate - from ._models_py3 import ServerPropertiesForGeoRestore - from ._models_py3 import ServerPropertiesForReplica - from ._models_py3 import ServerPropertiesForRestore - from ._models_py3 import ServerSecurityAlertPolicy - from ._models_py3 import ServerUpdateParameters - from ._models_py3 import Sku - from ._models_py3 import StorageProfile - from ._models_py3 import TagsObject - from ._models_py3 import TopQueryStatisticsInput - from ._models_py3 import TrackedResource - from ._models_py3 import VirtualNetworkRule - from ._models_py3 import WaitStatistic - from ._models_py3 import WaitStatisticsInput -except (SyntaxError, ImportError): - from ._models import Advisor - from ._models import AzureEntityResource - from ._models import Configuration - from ._models import Database - from ._models import ErrorAdditionalInfo - from ._models import ErrorResponse - from ._models import FirewallRule - from ._models import LogFile - from ._models import NameAvailability - from ._models import NameAvailabilityRequest - from ._models import Operation - from ._models import OperationDisplay - from ._models import OperationListResult - from ._models import PerformanceTierProperties - from ._models import PerformanceTierServiceLevelObjectives - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointProperty - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkServiceConnectionStateProperty - from ._models import ProxyResource - from ._models import QueryStatistic - from ._models import QueryText - from ._models import RecommendationAction - from ._models import RecommendationActionsResultList - from ._models import RecommendedActionSessionsOperationStatus - from ._models import Resource - from ._models import Server - from ._models import ServerForCreate - from ._models import ServerPrivateEndpointConnection - from ._models import ServerPrivateEndpointConnectionProperties - from ._models import ServerPrivateLinkServiceConnectionStateProperty - from ._models import ServerPropertiesForCreate - from ._models import ServerPropertiesForDefaultCreate - from ._models import ServerPropertiesForGeoRestore - from ._models import ServerPropertiesForReplica - from ._models import ServerPropertiesForRestore - from ._models import ServerSecurityAlertPolicy - from ._models import ServerUpdateParameters - from ._models import Sku - from ._models import StorageProfile - from ._models import TagsObject - from ._models import TopQueryStatisticsInput - from ._models import TrackedResource - from ._models import VirtualNetworkRule - from ._models import WaitStatistic - from ._models import WaitStatisticsInput -from ._paged_models import AdvisorPaged -from ._paged_models import ConfigurationPaged -from ._paged_models import DatabasePaged -from ._paged_models import FirewallRulePaged -from ._paged_models import LogFilePaged -from ._paged_models import PerformanceTierPropertiesPaged -from ._paged_models import PrivateEndpointConnectionPaged -from ._paged_models import PrivateLinkResourcePaged -from ._paged_models import QueryStatisticPaged -from ._paged_models import QueryTextPaged -from ._paged_models import RecommendationActionPaged -from ._paged_models import ServerPaged -from ._paged_models import VirtualNetworkRulePaged -from ._paged_models import WaitStatisticPaged -from ._maria_db_management_client_enums import ( - ServerVersion, - SslEnforcementEnum, - PublicNetworkAccessEnum, - PrivateLinkServiceConnectionStateStatus, - PrivateLinkServiceConnectionStateActionsRequire, - PrivateEndpointProvisioningState, - ServerState, - GeoRedundantBackup, - StorageAutogrow, - SkuTier, - VirtualNetworkRuleState, - OperationOrigin, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'Advisor', - 'AzureEntityResource', - 'Configuration', - 'Database', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'FirewallRule', - 'LogFile', - 'NameAvailability', - 'NameAvailabilityRequest', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'PerformanceTierProperties', - 'PerformanceTierServiceLevelObjectives', - 'PrivateEndpointConnection', - 'PrivateEndpointProperty', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkServiceConnectionStateProperty', - 'ProxyResource', - 'QueryStatistic', - 'QueryText', - 'RecommendationAction', - 'RecommendationActionsResultList', - 'RecommendedActionSessionsOperationStatus', - 'Resource', - 'Server', - 'ServerForCreate', - 'ServerPrivateEndpointConnection', - 'ServerPrivateEndpointConnectionProperties', - 'ServerPrivateLinkServiceConnectionStateProperty', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForGeoRestore', - 'ServerPropertiesForReplica', - 'ServerPropertiesForRestore', - 'ServerSecurityAlertPolicy', - 'ServerUpdateParameters', - 'Sku', - 'StorageProfile', - 'TagsObject', - 'TopQueryStatisticsInput', - 'TrackedResource', - 'VirtualNetworkRule', - 'WaitStatistic', - 'WaitStatisticsInput', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'PerformanceTierPropertiesPaged', - 'QueryTextPaged', - 'QueryStatisticPaged', - 'WaitStatisticPaged', - 'AdvisorPaged', - 'RecommendationActionPaged', - 'PrivateEndpointConnectionPaged', - 'PrivateLinkResourcePaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'PublicNetworkAccessEnum', - 'PrivateLinkServiceConnectionStateStatus', - 'PrivateLinkServiceConnectionStateActionsRequire', - 'PrivateEndpointProvisioningState', - 'ServerState', - 'GeoRedundantBackup', - 'StorageAutogrow', - 'SkuTier', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_maria_db_management_client_enums.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_maria_db_management_client_enums.py deleted file mode 100644 index c4a2b47b6b1..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_maria_db_management_client_enums.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ServerVersion(str, Enum): - - five_full_stop_six = "5.6" - five_full_stop_seven = "5.7" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class PublicNetworkAccessEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class PrivateLinkServiceConnectionStateStatus(str, Enum): - - approved = "Approved" - pending = "Pending" - rejected = "Rejected" - disconnected = "Disconnected" - - -class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): - - none = "None" - - -class PrivateEndpointProvisioningState(str, Enum): - - approving = "Approving" - ready = "Ready" - dropping = "Dropping" - failed = "Failed" - rejecting = "Rejecting" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class StorageAutogrow(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models.py deleted file mode 100644 index 6417439d64f..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models.py +++ /dev/null @@ -1,2019 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class Advisor(ProxyResource): - """Represents a recommendation action advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param properties: The properties of a recommendation action advisor. - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Advisor, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: Error message - :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = None - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class QueryStatistic(ProxyResource): - """Represents a Query Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Database query identifier. - :type query_id: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param aggregation_function: Aggregation function name. - :type aggregation_function: str - :param database_names: The list of database names. - :type database_names: list[str] - :param query_execution_count: Number of query executions in this time - interval. - :type query_execution_count: long - :param metric_name: Metric name. - :type metric_name: str - :param metric_display_name: Metric display name. - :type metric_display_name: str - :param metric_value: Metric value. - :type metric_value: float - :param metric_value_unit: Metric value unit. - :type metric_value_unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, - 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, - 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, - 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, - 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, - 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = kwargs.get('query_id', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.aggregation_function = kwargs.get('aggregation_function', None) - self.database_names = kwargs.get('database_names', None) - self.query_execution_count = kwargs.get('query_execution_count', None) - self.metric_name = kwargs.get('metric_name', None) - self.metric_display_name = kwargs.get('metric_display_name', None) - self.metric_value = kwargs.get('metric_value', None) - self.metric_value_unit = kwargs.get('metric_value_unit', None) - - -class QueryText(ProxyResource): - """Represents a Query Text. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Query identifier unique to the server. - :type query_id: str - :param query_text: Query text. - :type query_text: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'query_text': {'key': 'properties.queryText', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryText, self).__init__(**kwargs) - self.query_id = kwargs.get('query_id', None) - self.query_text = kwargs.get('query_text', None) - - -class RecommendationAction(ProxyResource): - """Represents a Recommendation Action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param advisor_name: Advisor name. - :type advisor_name: str - :param session_id: Recommendation action session identifier. - :type session_id: str - :param action_id: Recommendation action identifier. - :type action_id: int - :param created_time: Recommendation action creation time. - :type created_time: datetime - :param expiration_time: Recommendation action expiration time. - :type expiration_time: datetime - :param reason: Recommendation action reason. - :type reason: str - :param recommendation_type: Recommendation action type. - :type recommendation_type: str - :param details: Recommendation action details. - :type details: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, - 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, - 'action_id': {'key': 'properties.actionId', 'type': 'int'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, - 'details': {'key': 'properties.details', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RecommendationAction, self).__init__(**kwargs) - self.advisor_name = kwargs.get('advisor_name', None) - self.session_id = kwargs.get('session_id', None) - self.action_id = kwargs.get('action_id', None) - self.created_time = kwargs.get('created_time', None) - self.expiration_time = kwargs.get('expiration_time', None) - self.reason = kwargs.get('reason', None) - self.recommendation_type = kwargs.get('recommendation_type', None) - self.details = kwargs.get('details', None) - - -class RecommendationActionsResultList(Model): - """A list of recommendation actions. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of recommendation action advisors. - :vartype value: - list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] - :ivar next_link: Link to retrieve next page of results. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecommendationAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecommendationActionsResultList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class RecommendedActionSessionsOperationStatus(Model): - """Recommendation action session operation status. - - :param name: Operation identifier. - :type name: str - :param start_time: Operation start time. - :type start_time: datetime - :param status: Operation status. - :type status: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.start_time = kwargs.get('start_time', None) - self.status = kwargs.get('status', None) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.master_server_id = kwargs.get('master_server_id', None) - self.replica_capacity = kwargs.get('replica_capacity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.private_endpoint_connections = None - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id of the private endpoint connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForReplica, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) - - -class Sku(Model): - """Billing information related properties of a server. - - :param name: The name of the sku, typically, tier + family + cores, e.g. - B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.storage_autogrow = kwargs.get('storage_autogrow', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TopQueryStatisticsInput(Model): - """Input to get top query statistics. - - All required parameters must be populated in order to send to Azure. - - :param number_of_top_queries: Required. Max number of top queries to - return. - :type number_of_top_queries: int - :param aggregation_function: Required. Aggregation function name. - :type aggregation_function: str - :param observed_metric: Required. Observed metric name. - :type observed_metric: str - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'number_of_top_queries': {'required': True}, - 'aggregation_function': {'required': True}, - 'observed_metric': {'required': True}, - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopQueryStatisticsInput, self).__init__(**kwargs) - self.number_of_top_queries = kwargs.get('number_of_top_queries', None) - self.aggregation_function = kwargs.get('aggregation_function', None) - self.observed_metric = kwargs.get('observed_metric', None) - self.observation_start_time = kwargs.get('observation_start_time', None) - self.observation_end_time = kwargs.get('observation_end_time', None) - self.aggregation_window = kwargs.get('aggregation_window', None) - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None - - -class WaitStatistic(ProxyResource): - """Represents a Wait Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param event_name: Wait event name. - :type event_name: str - :param event_type_name: Wait event type name. - :type event_type_name: str - :param query_id: Database query identifier. - :type query_id: long - :param database_name: Database Name. - :type database_name: str - :param user_id: Database user identifier. - :type user_id: long - :param count: Wait event count observed in this time interval. - :type count: long - :param total_time_in_ms: Total time of wait in milliseconds in this time - interval. - :type total_time_in_ms: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'event_name': {'key': 'properties.eventName', 'type': 'str'}, - 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'long'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'long'}, - 'count': {'key': 'properties.count', 'type': 'long'}, - 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(WaitStatistic, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.event_name = kwargs.get('event_name', None) - self.event_type_name = kwargs.get('event_type_name', None) - self.query_id = kwargs.get('query_id', None) - self.database_name = kwargs.get('database_name', None) - self.user_id = kwargs.get('user_id', None) - self.count = kwargs.get('count', None) - self.total_time_in_ms = kwargs.get('total_time_in_ms', None) - - -class WaitStatisticsInput(Model): - """Input to get wait statistics. - - All required parameters must be populated in order to send to Azure. - - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitStatisticsInput, self).__init__(**kwargs) - self.observation_start_time = kwargs.get('observation_start_time', None) - self.observation_end_time = kwargs.get('observation_end_time', None) - self.aggregation_window = kwargs.get('aggregation_window', None) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models_py3.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models_py3.py deleted file mode 100644 index e76da1d4ec4..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_models_py3.py +++ /dev/null @@ -1,2019 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class Advisor(ProxyResource): - """Represents a recommendation action advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param properties: The properties of a recommendation action advisor. - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Advisor, self).__init__(**kwargs) - self.properties = properties - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: Error message - :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = size_in_kb - self.created_time = None - self.last_modified_time = None - self.log_file_type = log_file_type - self.url = None - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = id - self.edition = edition - self.v_core = v_core - self.hardware_generation = hardware_generation - self.max_backup_retention_days = max_backup_retention_days - self.min_backup_retention_days = min_backup_retention_days - self.max_storage_mb = max_storage_mb - self.min_storage_mb = min_storage_mb - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = id - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status: str, description: str, **kwargs) -> None: - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class QueryStatistic(ProxyResource): - """Represents a Query Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Database query identifier. - :type query_id: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param aggregation_function: Aggregation function name. - :type aggregation_function: str - :param database_names: The list of database names. - :type database_names: list[str] - :param query_execution_count: Number of query executions in this time - interval. - :type query_execution_count: long - :param metric_name: Metric name. - :type metric_name: str - :param metric_display_name: Metric display name. - :type metric_display_name: str - :param metric_value: Metric value. - :type metric_value: float - :param metric_value_unit: Metric value unit. - :type metric_value_unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, - 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, - 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, - 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, - 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, - 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, - } - - def __init__(self, *, query_id: str=None, start_time=None, end_time=None, aggregation_function: str=None, database_names=None, query_execution_count: int=None, metric_name: str=None, metric_display_name: str=None, metric_value: float=None, metric_value_unit: str=None, **kwargs) -> None: - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = query_id - self.start_time = start_time - self.end_time = end_time - self.aggregation_function = aggregation_function - self.database_names = database_names - self.query_execution_count = query_execution_count - self.metric_name = metric_name - self.metric_display_name = metric_display_name - self.metric_value = metric_value - self.metric_value_unit = metric_value_unit - - -class QueryText(ProxyResource): - """Represents a Query Text. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Query identifier unique to the server. - :type query_id: str - :param query_text: Query text. - :type query_text: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'query_text': {'key': 'properties.queryText', 'type': 'str'}, - } - - def __init__(self, *, query_id: str=None, query_text: str=None, **kwargs) -> None: - super(QueryText, self).__init__(**kwargs) - self.query_id = query_id - self.query_text = query_text - - -class RecommendationAction(ProxyResource): - """Represents a Recommendation Action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param advisor_name: Advisor name. - :type advisor_name: str - :param session_id: Recommendation action session identifier. - :type session_id: str - :param action_id: Recommendation action identifier. - :type action_id: int - :param created_time: Recommendation action creation time. - :type created_time: datetime - :param expiration_time: Recommendation action expiration time. - :type expiration_time: datetime - :param reason: Recommendation action reason. - :type reason: str - :param recommendation_type: Recommendation action type. - :type recommendation_type: str - :param details: Recommendation action details. - :type details: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, - 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, - 'action_id': {'key': 'properties.actionId', 'type': 'int'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, - 'details': {'key': 'properties.details', 'type': '{str}'}, - } - - def __init__(self, *, advisor_name: str=None, session_id: str=None, action_id: int=None, created_time=None, expiration_time=None, reason: str=None, recommendation_type: str=None, details=None, **kwargs) -> None: - super(RecommendationAction, self).__init__(**kwargs) - self.advisor_name = advisor_name - self.session_id = session_id - self.action_id = action_id - self.created_time = created_time - self.expiration_time = expiration_time - self.reason = reason - self.recommendation_type = recommendation_type - self.details = details - - -class RecommendationActionsResultList(Model): - """A list of recommendation actions. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of recommendation action advisors. - :vartype value: - list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] - :ivar next_link: Link to retrieve next page of results. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecommendationAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendationActionsResultList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class RecommendedActionSessionsOperationStatus(Model): - """Recommendation action session operation status. - - :param name: Operation identifier. - :type name: str - :param start_time: Operation start time. - :type start_time: datetime - :param status: Operation status. - :type status: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, start_time=None, status: str=None, **kwargs) -> None: - super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) - self.name = name - self.start_time = start_time - self.status = status - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, public_network_access=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) - self.sku = sku - self.administrator_login = administrator_login - self.version = version - self.ssl_enforcement = ssl_enforcement - self.user_visible_state = user_visible_state - self.fully_qualified_domain_name = fully_qualified_domain_name - self.earliest_restore_date = earliest_restore_date - self.storage_profile = storage_profile - self.replication_role = replication_role - self.master_server_id = master_server_id - self.replica_capacity = replica_capacity - self.public_network_access = public_network_access - self.private_endpoint_connections = None - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, properties, location: str, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id of the private endpoint connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status, description: str, **kwargs) -> None: - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, *, version=None, ssl_enforcement=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.public_network_access = public_network_access - self.storage_profile = storage_profile - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, *, administrator_login: str, administrator_login_password: str, version=None, ssl_enforcement=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_server_id: str, restore_point_in_time, version=None, ssl_enforcement=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, public_network_access=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.public_network_access = public_network_access - self.replication_role = replication_role - self.tags = tags - - -class Sku(Model): - """Billing information related properties of a server. - - :param name: The name of the sku, typically, tier + family + cores, e.g. - B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None, storage_mb: int=None, storage_autogrow=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb - self.storage_autogrow = storage_autogrow - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TopQueryStatisticsInput(Model): - """Input to get top query statistics. - - All required parameters must be populated in order to send to Azure. - - :param number_of_top_queries: Required. Max number of top queries to - return. - :type number_of_top_queries: int - :param aggregation_function: Required. Aggregation function name. - :type aggregation_function: str - :param observed_metric: Required. Observed metric name. - :type observed_metric: str - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'number_of_top_queries': {'required': True}, - 'aggregation_function': {'required': True}, - 'observed_metric': {'required': True}, - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, *, number_of_top_queries: int, aggregation_function: str, observed_metric: str, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: - super(TopQueryStatisticsInput, self).__init__(**kwargs) - self.number_of_top_queries = number_of_top_queries - self.aggregation_function = aggregation_function - self.observed_metric = observed_metric - self.observation_start_time = observation_start_time - self.observation_end_time = observation_end_time - self.aggregation_window = aggregation_window - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None - - -class WaitStatistic(ProxyResource): - """Represents a Wait Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param event_name: Wait event name. - :type event_name: str - :param event_type_name: Wait event type name. - :type event_type_name: str - :param query_id: Database query identifier. - :type query_id: long - :param database_name: Database Name. - :type database_name: str - :param user_id: Database user identifier. - :type user_id: long - :param count: Wait event count observed in this time interval. - :type count: long - :param total_time_in_ms: Total time of wait in milliseconds in this time - interval. - :type total_time_in_ms: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'event_name': {'key': 'properties.eventName', 'type': 'str'}, - 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'long'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'long'}, - 'count': {'key': 'properties.count', 'type': 'long'}, - 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, start_time=None, end_time=None, event_name: str=None, event_type_name: str=None, query_id: int=None, database_name: str=None, user_id: int=None, count: int=None, total_time_in_ms: float=None, **kwargs) -> None: - super(WaitStatistic, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.event_name = event_name - self.event_type_name = event_type_name - self.query_id = query_id - self.database_name = database_name - self.user_id = user_id - self.count = count - self.total_time_in_ms = total_time_in_ms - - -class WaitStatisticsInput(Model): - """Input to get wait statistics. - - All required parameters must be populated in order to send to Azure. - - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, *, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: - super(WaitStatisticsInput, self).__init__(**kwargs) - self.observation_start_time = observation_start_time - self.observation_end_time = observation_end_time - self.aggregation_window = aggregation_window diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_paged_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_paged_models.py deleted file mode 100644 index ef79111fe09..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/models/_paged_models.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) -class ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) -class LogFilePaged(Paged): - """ - A paging container for iterating over a list of :class:`LogFile ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LogFile]'} - } - - def __init__(self, *args, **kwargs): - - super(LogFilePaged, self).__init__(*args, **kwargs) -class PerformanceTierPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`PerformanceTierProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) -class QueryTextPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryText ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryText]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryTextPaged, self).__init__(*args, **kwargs) -class QueryStatisticPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryStatistic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryStatistic]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryStatisticPaged, self).__init__(*args, **kwargs) -class WaitStatisticPaged(Paged): - """ - A paging container for iterating over a list of :class:`WaitStatistic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WaitStatistic]'} - } - - def __init__(self, *args, **kwargs): - - super(WaitStatisticPaged, self).__init__(*args, **kwargs) -class AdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`Advisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Advisor]'} - } - - def __init__(self, *args, **kwargs): - - super(AdvisorPaged, self).__init__(*args, **kwargs) -class RecommendationActionPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendationAction ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendationAction]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationActionPaged, self).__init__(*args, **kwargs) -class PrivateEndpointConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) -class PrivateLinkResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateLinkResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/__init__.py deleted file mode 100644 index 0b18bc99ed1..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._servers_operations import ServersOperations -from ._replicas_operations import ReplicasOperations -from ._firewall_rules_operations import FirewallRulesOperations -from ._virtual_network_rules_operations import VirtualNetworkRulesOperations -from ._databases_operations import DatabasesOperations -from ._configurations_operations import ConfigurationsOperations -from ._log_files_operations import LogFilesOperations -from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations -from ._check_name_availability_operations import CheckNameAvailabilityOperations -from ._operations import Operations -from ._query_texts_operations import QueryTextsOperations -from ._top_query_statistics_operations import TopQueryStatisticsOperations -from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations -from ._recommended_actions_operations import RecommendedActionsOperations -from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from ._maria_db_management_client_operations import MariaDBManagementClientOperationsMixin - -__all__ = [ - 'ServersOperations', - 'ReplicasOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'Operations', - 'QueryTextsOperations', - 'TopQueryStatisticsOperations', - 'WaitStatisticsOperations', - 'AdvisorsOperations', - 'RecommendedActionsOperations', - 'LocationBasedRecommendedActionSessionsOperationStatusOperations', - 'LocationBasedRecommendedActionSessionsResultOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ServerSecurityAlertPoliciesOperations', - 'MariaDBManagementClientOperationsMixin', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_advisors_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_advisors_operations.py deleted file mode 100644 index c01041b20ac..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_advisors_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AdvisorsOperations(object): - """AdvisorsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, advisor_name, custom_headers=None, raw=False, **operation_config): - """Get a recommendation action advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Advisor or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.Advisor or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Advisor', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List recommendation action advisors. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Advisor - :rtype: - ~azure.mgmt.rdbms.mariadb.models.AdvisorPaged[~azure.mgmt.rdbms.mariadb.models.Advisor] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_check_name_availability_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_check_name_availability_operations.py deleted file mode 100644 index eb2470c5253..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_check_name_availability_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckNameAvailabilityOperations(object): - """CheckNameAvailabilityOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def execute( - self, name, type=None, custom_headers=None, raw=False, **operation_config): - """Check the availability of name for resource. - - :param name: Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.NameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_availability_request = models.NameAvailabilityRequest(name=name, type=type) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/checkNameAvailability'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_configurations_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_configurations_operations.py deleted file mode 100644 index 58075428f2b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ConfigurationsOperations(object): - """ConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Configuration(value=value, source=source) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Configuration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a configuration of a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param value: Value of the configuration. - :type value: str - :param source: Source of the configuration. - :type source: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Configuration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - configuration_name=configuration_name, - value=value, - source=source, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations/{configurationName}'} - - def get( - self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a configuration of server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Configuration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.Configuration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations/{configurationName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the configurations in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Configuration - :rtype: - ~azure.mgmt.rdbms.mariadb.models.ConfigurationPaged[~azure.mgmt.rdbms.mariadb.models.Configuration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_databases_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_databases_operations.py deleted file mode 100644 index 3b505dae5d1..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_databases_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DatabasesOperations(object): - """DatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Database(charset=charset, collation=collation) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Database') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - if response.status_code == 201: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new database or updates an existing database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - charset=charset, - collation=collation, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/databases/{databaseName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Database or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.Database or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/databases/{databaseName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the databases in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Database - :rtype: - ~azure.mgmt.rdbms.mariadb.models.DatabasePaged[~azure.mgmt.rdbms.mariadb.models.Database] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/databases'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_firewall_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_firewall_rules_operations.py deleted file mode 100644 index f850bc4c9dc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_firewall_rules_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FirewallRulesOperations(object): - """FirewallRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): - parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'FirewallRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - if response.status_code == 201: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new firewall rule or updates an existing firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the server firewall - rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: The end IP address of the server firewall rule. - Must be IPv4 format. - :type end_ip_address: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.FirewallRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - start_ip_address=start_ip_address, - end_ip_address=end_ip_address, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FirewallRule - :rtype: - ~azure.mgmt.rdbms.mariadb.models.FirewallRulePaged[~azure.mgmt.rdbms.mariadb.models.FirewallRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/firewallRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_performance_tier_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_performance_tier_operations.py deleted file mode 100644 index 45fc4fd7599..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_performance_tier_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedPerformanceTierOperations(object): - """LocationBasedPerformanceTierOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location_name, custom_headers=None, raw=False, **operation_config): - """List all the performance tiers at specified location in a given - subscription. - - :param location_name: The name of the location. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerformanceTierProperties - :rtype: - ~azure.mgmt.rdbms.mariadb.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierProperties] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/performanceTiers'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py deleted file mode 100644 index 5705108d586..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedRecommendedActionSessionsOperationStatusOperations(object): - """LocationBasedRecommendedActionSessionsOperationStatusOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Recommendation action session operation status. - - :param location_name: The name of the location. - :type location_name: str - :param operation_id: The operation identifier. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendedActionSessionsOperationStatus or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.rdbms.mariadb.models.RecommendedActionSessionsOperationStatus - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendedActionSessionsOperationStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py deleted file mode 100644 index 35e93df18e6..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedRecommendedActionSessionsResultOperations(object): - """LocationBasedRecommendedActionSessionsResultOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Recommendation action session operation result. - - :param location_name: The name of the location. - :type location_name: str - :param operation_id: The operation identifier. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RecommendationAction - :rtype: - ~azure.mgmt.rdbms.mariadb.models.RecommendationActionPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_log_files_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_log_files_operations.py deleted file mode 100644 index b1535b9af88..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_log_files_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LogFilesOperations(object): - """LogFilesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the log files in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LogFile - :rtype: - ~azure.mgmt.rdbms.mariadb.models.LogFilePaged[~azure.mgmt.rdbms.mariadb.models.LogFile] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/logFiles'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_maria_db_management_client_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_maria_db_management_client_operations.py deleted file mode 100644 index e1c0fb1c5ec..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_maria_db_management_client_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class MariaDBManagementClientOperationsMixin(object): - - - def _create_recommended_action_session_initial( - self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.create_recommended_action_session.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - query_parameters['databaseName'] = self._serialize.query("database_name", database_name, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create_recommended_action_session( - self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create recommendation action session for the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._create_recommended_action_session_initial( - resource_group_name=resource_group_name, - server_name=server_name, - advisor_name=advisor_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_recommended_action_session.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_operations.py deleted file mode 100644 index 32156690b2d..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_operations.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DBforMariaDB/operations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_endpoint_connections_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index fef5551ccfe..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,490 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param private_endpoint: Private endpoint which the connection belongs - to. - :type private_endpoint: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint=private_endpoint, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _update_tags_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on private endpoint connection. - - Updates private endpoint connection with the specified tags. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets all private endpoint connections on a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateEndpointConnection - :rtype: - ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnectionPaged[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_link_resources_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_link_resources_operations.py deleted file mode 100644 index 6abd192ce35..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets the private link resources for MariaDB server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateLinkResource - :rtype: - ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourcePaged[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources'} - - def get( - self, resource_group_name, server_name, group_name, custom_headers=None, raw=False, **operation_config): - """Gets a private link resource for MariaDB server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param group_name: The name of the private link resource. - :type group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'groupName': self._serialize.url("group_name", group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources/{groupName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_query_texts_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_query_texts_operations.py deleted file mode 100644 index 6504c404733..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_query_texts_operations.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class QueryTextsOperations(object): - """QueryTextsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, query_id, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store query texts for the queryId. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_id: The Query-Store query identifier. - :type query_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QueryText or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryText or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'queryId': self._serialize.url("query_id", query_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('QueryText', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts/{queryId}'} - - def list_by_server( - self, resource_group_name, server_name, query_ids, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store query texts for specified queryIds. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_ids: The query identifiers - :type query_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of QueryText - :rtype: - ~azure.mgmt.rdbms.mariadb.models.QueryTextPaged[~azure.mgmt.rdbms.mariadb.models.QueryText] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - query_parameters['queryIds'] = self._serialize.query("query_ids", query_ids, '[str]', div=',') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.QueryTextPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_recommended_actions_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_recommended_actions_operations.py deleted file mode 100644 index 697511db74f..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_recommended_actions_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RecommendedActionsOperations(object): - """RecommendedActionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, advisor_name, recommended_action_name, custom_headers=None, raw=False, **operation_config): - """Retrieve recommended actions from the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param recommended_action_name: The recommended action name. - :type recommended_action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationAction or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendationAction or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str'), - 'recommendedActionName': self._serialize.url("recommended_action_name", recommended_action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationAction', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}'} - - def list_by_server( - self, resource_group_name, server_name, advisor_name, session_id=None, custom_headers=None, raw=False, **operation_config): - """Retrieve recommended actions from the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param session_id: The recommendation action session identifier. - :type session_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RecommendationAction - :rtype: - ~azure.mgmt.rdbms.mariadb.models.RecommendationActionPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if session_id is not None: - query_parameters['sessionId'] = self._serialize.query("session_id", session_id, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_replicas_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_replicas_operations.py deleted file mode 100644 index 9325589c03f..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_replicas_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReplicasOperations(object): - """ReplicasOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the replicas for a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/replicas'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_server_security_alert_policies_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_server_security_alert_policies_operations.py deleted file mode 100644 index 1216113810d..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_server_security_alert_policies_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "Default" - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_servers_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_servers_operations.py deleted file mode 100644 index 9c0a0d6552a..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_servers_operations.py +++ /dev/null @@ -1,784 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServersOperations(object): - """ServersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerForCreate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - if response.status_code == 201: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new server or updates an existing server. The update action - will overwrite the existing server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for creating or updating a - server. - :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerForCreate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing server. The request body can contain one to many of - the properties present in the normal server definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for updating a server. - :type parameters: - ~azure.mgmt.rdbms.mariadb.models.ServerUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Server or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2018-06-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2018-06-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2018-06-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/servers'} - - - def _restart_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/restart'} - - - def _start_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2020-01-01" - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a stopped server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/start'} - - - def _stop_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2020-01-01" - - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a running server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/stop'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_top_query_statistics_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_top_query_statistics_operations.py deleted file mode 100644 index 33898844fed..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_top_query_statistics_operations.py +++ /dev/null @@ -1,187 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TopQueryStatisticsOperations(object): - """TopQueryStatisticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, query_statistic_id, custom_headers=None, raw=False, **operation_config): - """Retrieve the query statistic for specified identifier. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_statistic_id: The Query Statistic identifier. - :type query_statistic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QueryStatistic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryStatistic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'queryStatisticId': self._serialize.url("query_statistic_id", query_statistic_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('QueryStatistic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics/{queryStatisticId}'} - - def list_by_server( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store top queries for specified metric and - aggregation. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for retrieving top query - statistics. - :type parameters: - ~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of QueryStatistic - :rtype: - ~azure.mgmt.rdbms.mariadb.models.QueryStatisticPaged[~azure.mgmt.rdbms.mariadb.models.QueryStatistic] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TopQueryStatisticsInput') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.QueryStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_virtual_network_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_virtual_network_rules_operations.py deleted file mode 100644 index 1a6bd6bfbd4..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_virtual_network_rules_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualNetworkRulesOperations(object): - """VirtualNetworkRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetworkRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): - parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualNetworkRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an existing virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param virtual_network_subnet_id: The ARM resource id of the virtual - network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule - before the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - virtual_network_subnet_id=virtual_network_subnet_id, - ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the virtual network rule with the given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual network rules in a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualNetworkRule - :rtype: - ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_wait_statistics_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_wait_statistics_operations.py deleted file mode 100644 index 1c58e6e42ca..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/operations/_wait_statistics_operations.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WaitStatisticsOperations(object): - """WaitStatisticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, wait_statistics_id, custom_headers=None, raw=False, **operation_config): - """Retrieve wait statistics for specified identifier. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param wait_statistics_id: The Wait Statistic identifier. - :type wait_statistics_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WaitStatistic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mariadb.models.WaitStatistic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'waitStatisticsId': self._serialize.url("wait_statistics_id", wait_statistics_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WaitStatistic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics/{waitStatisticsId}'} - - def list_by_server( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - """Retrieve wait statistics for specified aggregation window. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for retrieving wait - statistics. - :type parameters: ~azure.mgmt.rdbms.mariadb.models.WaitStatisticsInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WaitStatistic - :rtype: - ~azure.mgmt.rdbms.mariadb.models.WaitStatisticPaged[~azure.mgmt.rdbms.mariadb.models.WaitStatistic] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'WaitStatisticsInput') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WaitStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/version.py deleted file mode 100644 index 5f1af9fb17b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mariadb/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2018-06-01" - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/__init__.py deleted file mode 100644 index 9fc6ca804bc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import MySQLManagementClientConfiguration -from ._my_sql_management_client import MySQLManagementClient -__all__ = ['MySQLManagementClient', 'MySQLManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_configuration.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_configuration.py deleted file mode 100644 index 21838cc23c5..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class MySQLManagementClientConfiguration(AzureConfiguration): - """Configuration for MySQLManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(MySQLManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_my_sql_management_client.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_my_sql_management_client.py deleted file mode 100644 index 5a1ec3d6105..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/_my_sql_management_client.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import MySQLManagementClientConfiguration -from .operations import MySQLManagementClientOperationsMixin -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import QueryTextsOperations -from .operations import TopQueryStatisticsOperations -from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations -from .operations import RecommendedActionsOperations -from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from .operations import LocationBasedRecommendedActionSessionsResultOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from . import models - - -class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - - :ivar config: Configuration for client. - :vartype config: MySQLManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations - :ivar replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.mysql.operations.ReplicasOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.mysql.operations.ConfigurationsOperations - :ivar log_files: LogFiles operations - :vartype log_files: azure.mgmt.rdbms.mysql.operations.LogFilesOperations - :ivar server_administrators: ServerAdministrators operations - :vartype server_administrators: azure.mgmt.rdbms.mysql.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTier operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations - :ivar query_texts: QueryTexts operations - :vartype query_texts: azure.mgmt.rdbms.mysql.operations.QueryTextsOperations - :ivar top_query_statistics: TopQueryStatistics operations - :vartype top_query_statistics: azure.mgmt.rdbms.mysql.operations.TopQueryStatisticsOperations - :ivar wait_statistics: WaitStatistics operations - :vartype wait_statistics: azure.mgmt.rdbms.mysql.operations.WaitStatisticsOperations - :ivar advisors: Advisors operations - :vartype advisors: azure.mgmt.rdbms.mysql.operations.AdvisorsOperations - :ivar recommended_actions: RecommendedActions operations - :vartype recommended_actions: azure.mgmt.rdbms.mysql.operations.RecommendedActionsOperations - :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatus operations - :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations - :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResult operations - :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsResultOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.mysql.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeys operations - :vartype server_keys: azure.mgmt.rdbms.mysql.operations.ServerKeysOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MySQLManagementClientConfiguration(credentials, subscription_id, base_url) - super(MySQLManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.query_texts = QueryTextsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.top_query_statistics = TopQueryStatisticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.wait_statistics = WaitStatisticsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.advisors = AdvisorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.recommended_actions = RecommendedActionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/__init__.py deleted file mode 100644 index 03a54f14bfb..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/__init__.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import Advisor - from ._models_py3 import AzureEntityResource - from ._models_py3 import Configuration - from ._models_py3 import Database - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import FirewallRule - from ._models_py3 import LogFile - from ._models_py3 import NameAvailability - from ._models_py3 import NameAvailabilityRequest - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import PerformanceTierProperties - from ._models_py3 import PerformanceTierServiceLevelObjectives - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointProperty - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourceProperties - from ._models_py3 import PrivateLinkServiceConnectionStateProperty - from ._models_py3 import ProxyResource - from ._models_py3 import QueryStatistic - from ._models_py3 import QueryText - from ._models_py3 import RecommendationAction - from ._models_py3 import RecommendationActionsResultList - from ._models_py3 import RecommendedActionSessionsOperationStatus - from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity - from ._models_py3 import Server - from ._models_py3 import ServerAdministratorResource - from ._models_py3 import ServerForCreate - from ._models_py3 import ServerKey - from ._models_py3 import ServerPrivateEndpointConnection - from ._models_py3 import ServerPrivateEndpointConnectionProperties - from ._models_py3 import ServerPrivateLinkServiceConnectionStateProperty - from ._models_py3 import ServerPropertiesForCreate - from ._models_py3 import ServerPropertiesForDefaultCreate - from ._models_py3 import ServerPropertiesForGeoRestore - from ._models_py3 import ServerPropertiesForReplica - from ._models_py3 import ServerPropertiesForRestore - from ._models_py3 import ServerSecurityAlertPolicy - from ._models_py3 import ServerUpdateParameters - from ._models_py3 import ServerUpgradeParameters - from ._models_py3 import Sku - from ._models_py3 import StorageProfile - from ._models_py3 import TagsObject - from ._models_py3 import TopQueryStatisticsInput - from ._models_py3 import TrackedResource - from ._models_py3 import VirtualNetworkRule - from ._models_py3 import WaitStatistic - from ._models_py3 import WaitStatisticsInput -except (SyntaxError, ImportError): - from ._models import Advisor - from ._models import AzureEntityResource - from ._models import Configuration - from ._models import Database - from ._models import ErrorAdditionalInfo - from ._models import ErrorResponse - from ._models import FirewallRule - from ._models import LogFile - from ._models import NameAvailability - from ._models import NameAvailabilityRequest - from ._models import Operation - from ._models import OperationDisplay - from ._models import OperationListResult - from ._models import PerformanceTierProperties - from ._models import PerformanceTierServiceLevelObjectives - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointProperty - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkServiceConnectionStateProperty - from ._models import ProxyResource - from ._models import QueryStatistic - from ._models import QueryText - from ._models import RecommendationAction - from ._models import RecommendationActionsResultList - from ._models import RecommendedActionSessionsOperationStatus - from ._models import Resource - from ._models import ResourceIdentity - from ._models import Server - from ._models import ServerAdministratorResource - from ._models import ServerForCreate - from ._models import ServerKey - from ._models import ServerPrivateEndpointConnection - from ._models import ServerPrivateEndpointConnectionProperties - from ._models import ServerPrivateLinkServiceConnectionStateProperty - from ._models import ServerPropertiesForCreate - from ._models import ServerPropertiesForDefaultCreate - from ._models import ServerPropertiesForGeoRestore - from ._models import ServerPropertiesForReplica - from ._models import ServerPropertiesForRestore - from ._models import ServerSecurityAlertPolicy - from ._models import ServerUpdateParameters - from ._models import ServerUpgradeParameters - from ._models import Sku - from ._models import StorageProfile - from ._models import TagsObject - from ._models import TopQueryStatisticsInput - from ._models import TrackedResource - from ._models import VirtualNetworkRule - from ._models import WaitStatistic - from ._models import WaitStatisticsInput -from ._paged_models import AdvisorPaged -from ._paged_models import ConfigurationPaged -from ._paged_models import DatabasePaged -from ._paged_models import FirewallRulePaged -from ._paged_models import LogFilePaged -from ._paged_models import PerformanceTierPropertiesPaged -from ._paged_models import PrivateEndpointConnectionPaged -from ._paged_models import PrivateLinkResourcePaged -from ._paged_models import QueryStatisticPaged -from ._paged_models import QueryTextPaged -from ._paged_models import RecommendationActionPaged -from ._paged_models import ServerAdministratorResourcePaged -from ._paged_models import ServerKeyPaged -from ._paged_models import ServerPaged -from ._paged_models import VirtualNetworkRulePaged -from ._paged_models import WaitStatisticPaged -from ._my_sql_management_client_enums import ( - ServerVersion, - SslEnforcementEnum, - MinimalTlsVersionEnum, - InfrastructureEncryption, - PublicNetworkAccessEnum, - PrivateLinkServiceConnectionStateStatus, - PrivateLinkServiceConnectionStateActionsRequire, - PrivateEndpointProvisioningState, - ServerState, - GeoRedundantBackup, - StorageAutogrow, - SkuTier, - IdentityType, - VirtualNetworkRuleState, - OperationOrigin, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'Advisor', - 'AzureEntityResource', - 'Configuration', - 'Database', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'FirewallRule', - 'LogFile', - 'NameAvailability', - 'NameAvailabilityRequest', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'PerformanceTierProperties', - 'PerformanceTierServiceLevelObjectives', - 'PrivateEndpointConnection', - 'PrivateEndpointProperty', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkServiceConnectionStateProperty', - 'ProxyResource', - 'QueryStatistic', - 'QueryText', - 'RecommendationAction', - 'RecommendationActionsResultList', - 'RecommendedActionSessionsOperationStatus', - 'Resource', - 'ResourceIdentity', - 'Server', - 'ServerAdministratorResource', - 'ServerForCreate', - 'ServerKey', - 'ServerPrivateEndpointConnection', - 'ServerPrivateEndpointConnectionProperties', - 'ServerPrivateLinkServiceConnectionStateProperty', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForGeoRestore', - 'ServerPropertiesForReplica', - 'ServerPropertiesForRestore', - 'ServerSecurityAlertPolicy', - 'ServerUpdateParameters', - 'ServerUpgradeParameters', - 'Sku', - 'StorageProfile', - 'TagsObject', - 'TopQueryStatisticsInput', - 'TrackedResource', - 'VirtualNetworkRule', - 'WaitStatistic', - 'WaitStatisticsInput', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'ServerAdministratorResourcePaged', - 'PerformanceTierPropertiesPaged', - 'QueryTextPaged', - 'QueryStatisticPaged', - 'WaitStatisticPaged', - 'AdvisorPaged', - 'RecommendationActionPaged', - 'PrivateEndpointConnectionPaged', - 'PrivateLinkResourcePaged', - 'ServerKeyPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'MinimalTlsVersionEnum', - 'InfrastructureEncryption', - 'PublicNetworkAccessEnum', - 'PrivateLinkServiceConnectionStateStatus', - 'PrivateLinkServiceConnectionStateActionsRequire', - 'PrivateEndpointProvisioningState', - 'ServerState', - 'GeoRedundantBackup', - 'StorageAutogrow', - 'SkuTier', - 'IdentityType', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models.py deleted file mode 100644 index d4ef96c2da7..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models.py +++ /dev/null @@ -1,2288 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class Advisor(ProxyResource): - """Represents a recommendation action advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param properties: The properties of a recommendation action advisor. - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Advisor, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: Error message - :type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mysql.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :param url: The url to download the log file from. - :type url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = kwargs.get('url', None) - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mysql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mysql.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class QueryStatistic(ProxyResource): - """Represents a Query Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Database query identifier. - :type query_id: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param aggregation_function: Aggregation function name. - :type aggregation_function: str - :param database_names: The list of database names. - :type database_names: list[str] - :param query_execution_count: Number of query executions in this time - interval. - :type query_execution_count: long - :param metric_name: Metric name. - :type metric_name: str - :param metric_display_name: Metric display name. - :type metric_display_name: str - :param metric_value: Metric value. - :type metric_value: float - :param metric_value_unit: Metric value unit. - :type metric_value_unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, - 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, - 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, - 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, - 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, - 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = kwargs.get('query_id', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.aggregation_function = kwargs.get('aggregation_function', None) - self.database_names = kwargs.get('database_names', None) - self.query_execution_count = kwargs.get('query_execution_count', None) - self.metric_name = kwargs.get('metric_name', None) - self.metric_display_name = kwargs.get('metric_display_name', None) - self.metric_value = kwargs.get('metric_value', None) - self.metric_value_unit = kwargs.get('metric_value_unit', None) - - -class QueryText(ProxyResource): - """Represents a Query Text. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Query identifier unique to the server. - :type query_id: str - :param query_text: Query text. - :type query_text: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'query_text': {'key': 'properties.queryText', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryText, self).__init__(**kwargs) - self.query_id = kwargs.get('query_id', None) - self.query_text = kwargs.get('query_text', None) - - -class RecommendationAction(ProxyResource): - """Represents a Recommendation Action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param advisor_name: Advisor name. - :type advisor_name: str - :param session_id: Recommendation action session identifier. - :type session_id: str - :param action_id: Recommendation action identifier. - :type action_id: int - :param created_time: Recommendation action creation time. - :type created_time: datetime - :param expiration_time: Recommendation action expiration time. - :type expiration_time: datetime - :param reason: Recommendation action reason. - :type reason: str - :param recommendation_type: Recommendation action type. - :type recommendation_type: str - :param details: Recommendation action details. - :type details: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, - 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, - 'action_id': {'key': 'properties.actionId', 'type': 'int'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, - 'details': {'key': 'properties.details', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RecommendationAction, self).__init__(**kwargs) - self.advisor_name = kwargs.get('advisor_name', None) - self.session_id = kwargs.get('session_id', None) - self.action_id = kwargs.get('action_id', None) - self.created_time = kwargs.get('created_time', None) - self.expiration_time = kwargs.get('expiration_time', None) - self.reason = kwargs.get('reason', None) - self.recommendation_type = kwargs.get('recommendation_type', None) - self.details = kwargs.get('details', None) - - -class RecommendationActionsResultList(Model): - """A list of recommendation actions. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.models.RecommendationAction] - :ivar next_link: Link to retrieve next page of results. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecommendationAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecommendationActionsResultList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class RecommendedActionSessionsOperationStatus(Model): - """Recommendation action session operation status. - - :param name: Operation identifier. - :type name: str - :param start_time: Operation start time. - :type start_time: datetime - :param status: Operation status. - :type status: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.start_time = kwargs.get('start_time', None) - self.status = kwargs.get('status', None) - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.rdbms.mysql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :ivar byok_enforcement: Status showing whether the server data encryption - is enabled with customer-managed keys. - :vartype byok_enforcement: str - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mysql.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'byok_enforcement': {'readonly': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.byok_enforcement = None - self.infrastructure_encryption = kwargs.get('infrastructure_encryption', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.master_server_id = kwargs.get('master_server_id', None) - self.replica_capacity = kwargs.get('replica_capacity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.private_endpoint_connections = None - - -class ServerAdministratorResource(ProxyResource): - """Represents a and external administrator to be created. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login account name. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAdministratorResource, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ServerKey(ProxyResource): - """A MySQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = kwargs.get('uri', None) - self.creation_date = None - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id of the private endpoint connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.infrastructure_encryption = kwargs.get('infrastructure_encryption', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForReplica, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7', '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) - - -class ServerUpgradeParameters(Model): - """ServerUpgradeParameters. - - :param target_server_version: Represents an server storage profile. - :type target_server_version: str - """ - - _attribute_map = { - 'target_server_version': {'key': 'properties.targetServerVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerUpgradeParameters, self).__init__(**kwargs) - self.target_server_version = kwargs.get('target_server_version', None) - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'name': {'required': True}, - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mysql.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.storage_autogrow = kwargs.get('storage_autogrow', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TopQueryStatisticsInput(Model): - """Input to get top query statistics. - - All required parameters must be populated in order to send to Azure. - - :param number_of_top_queries: Required. Max number of top queries to - return. - :type number_of_top_queries: int - :param aggregation_function: Required. Aggregation function name. - :type aggregation_function: str - :param observed_metric: Required. Observed metric name. - :type observed_metric: str - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'number_of_top_queries': {'required': True}, - 'aggregation_function': {'required': True}, - 'observed_metric': {'required': True}, - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopQueryStatisticsInput, self).__init__(**kwargs) - self.number_of_top_queries = kwargs.get('number_of_top_queries', None) - self.aggregation_function = kwargs.get('aggregation_function', None) - self.observed_metric = kwargs.get('observed_metric', None) - self.observation_start_time = kwargs.get('observation_start_time', None) - self.observation_end_time = kwargs.get('observation_end_time', None) - self.aggregation_window = kwargs.get('aggregation_window', None) - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None - - -class WaitStatistic(ProxyResource): - """Represents a Wait Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param event_name: Wait event name. - :type event_name: str - :param event_type_name: Wait event type name. - :type event_type_name: str - :param query_id: Database query identifier. - :type query_id: long - :param database_name: Database Name. - :type database_name: str - :param user_id: Database user identifier. - :type user_id: long - :param count: Wait event count observed in this time interval. - :type count: long - :param total_time_in_ms: Total time of wait in milliseconds in this time - interval. - :type total_time_in_ms: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'event_name': {'key': 'properties.eventName', 'type': 'str'}, - 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'long'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'long'}, - 'count': {'key': 'properties.count', 'type': 'long'}, - 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(WaitStatistic, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.event_name = kwargs.get('event_name', None) - self.event_type_name = kwargs.get('event_type_name', None) - self.query_id = kwargs.get('query_id', None) - self.database_name = kwargs.get('database_name', None) - self.user_id = kwargs.get('user_id', None) - self.count = kwargs.get('count', None) - self.total_time_in_ms = kwargs.get('total_time_in_ms', None) - - -class WaitStatisticsInput(Model): - """Input to get wait statistics. - - All required parameters must be populated in order to send to Azure. - - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitStatisticsInput, self).__init__(**kwargs) - self.observation_start_time = kwargs.get('observation_start_time', None) - self.observation_end_time = kwargs.get('observation_end_time', None) - self.aggregation_window = kwargs.get('aggregation_window', None) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models_py3.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models_py3.py deleted file mode 100644 index 681dcefd279..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_models_py3.py +++ /dev/null @@ -1,2288 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class Advisor(ProxyResource): - """Represents a recommendation action advisor. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param properties: The properties of a recommendation action advisor. - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Advisor, self).__init__(**kwargs) - self.properties = properties - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: Error message - :type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mysql.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :param url: The url to download the log file from. - :type url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = size_in_kb - self.created_time = None - self.last_modified_time = None - self.log_file_type = log_file_type - self.url = url - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mysql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mysql.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = id - self.edition = edition - self.v_core = v_core - self.hardware_generation = hardware_generation - self.max_backup_retention_days = max_backup_retention_days - self.min_backup_retention_days = min_backup_retention_days - self.max_storage_mb = max_storage_mb - self.min_storage_mb = min_storage_mb - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = id - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status: str, description: str, **kwargs) -> None: - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class QueryStatistic(ProxyResource): - """Represents a Query Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Database query identifier. - :type query_id: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param aggregation_function: Aggregation function name. - :type aggregation_function: str - :param database_names: The list of database names. - :type database_names: list[str] - :param query_execution_count: Number of query executions in this time - interval. - :type query_execution_count: long - :param metric_name: Metric name. - :type metric_name: str - :param metric_display_name: Metric display name. - :type metric_display_name: str - :param metric_value: Metric value. - :type metric_value: float - :param metric_value_unit: Metric value unit. - :type metric_value_unit: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, - 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, - 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, - 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, - 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, - 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, - } - - def __init__(self, *, query_id: str=None, start_time=None, end_time=None, aggregation_function: str=None, database_names=None, query_execution_count: int=None, metric_name: str=None, metric_display_name: str=None, metric_value: float=None, metric_value_unit: str=None, **kwargs) -> None: - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = query_id - self.start_time = start_time - self.end_time = end_time - self.aggregation_function = aggregation_function - self.database_names = database_names - self.query_execution_count = query_execution_count - self.metric_name = metric_name - self.metric_display_name = metric_display_name - self.metric_value = metric_value - self.metric_value_unit = metric_value_unit - - -class QueryText(ProxyResource): - """Represents a Query Text. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param query_id: Query identifier unique to the server. - :type query_id: str - :param query_text: Query text. - :type query_text: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, - 'query_text': {'key': 'properties.queryText', 'type': 'str'}, - } - - def __init__(self, *, query_id: str=None, query_text: str=None, **kwargs) -> None: - super(QueryText, self).__init__(**kwargs) - self.query_id = query_id - self.query_text = query_text - - -class RecommendationAction(ProxyResource): - """Represents a Recommendation Action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param advisor_name: Advisor name. - :type advisor_name: str - :param session_id: Recommendation action session identifier. - :type session_id: str - :param action_id: Recommendation action identifier. - :type action_id: int - :param created_time: Recommendation action creation time. - :type created_time: datetime - :param expiration_time: Recommendation action expiration time. - :type expiration_time: datetime - :param reason: Recommendation action reason. - :type reason: str - :param recommendation_type: Recommendation action type. - :type recommendation_type: str - :param details: Recommendation action details. - :type details: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, - 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, - 'action_id': {'key': 'properties.actionId', 'type': 'int'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, - 'details': {'key': 'properties.details', 'type': '{str}'}, - } - - def __init__(self, *, advisor_name: str=None, session_id: str=None, action_id: int=None, created_time=None, expiration_time=None, reason: str=None, recommendation_type: str=None, details=None, **kwargs) -> None: - super(RecommendationAction, self).__init__(**kwargs) - self.advisor_name = advisor_name - self.session_id = session_id - self.action_id = action_id - self.created_time = created_time - self.expiration_time = expiration_time - self.reason = reason - self.recommendation_type = recommendation_type - self.details = details - - -class RecommendationActionsResultList(Model): - """A list of recommendation actions. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.models.RecommendationAction] - :ivar next_link: Link to retrieve next page of results. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecommendationAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RecommendationActionsResultList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class RecommendedActionSessionsOperationStatus(Model): - """Recommendation action session operation status. - - :param name: Operation identifier. - :type name: str - :param start_time: Operation start time. - :type start_time: datetime - :param status: Operation status. - :type status: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, start_time=None, status: str=None, **kwargs) -> None: - super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) - self.name = name - self.start_time = start_time - self.status = status - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.rdbms.mysql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :ivar byok_enforcement: Status showing whether the server data encryption - is enabled with customer-managed keys. - :vartype byok_enforcement: str - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mysql.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'byok_enforcement': {'readonly': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, public_network_access=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.sku = sku - self.administrator_login = administrator_login - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.byok_enforcement = None - self.infrastructure_encryption = infrastructure_encryption - self.user_visible_state = user_visible_state - self.fully_qualified_domain_name = fully_qualified_domain_name - self.earliest_restore_date = earliest_restore_date - self.storage_profile = storage_profile - self.replication_role = replication_role - self.master_server_id = master_server_id - self.replica_capacity = replica_capacity - self.public_network_access = public_network_access - self.private_endpoint_connections = None - - -class ServerAdministratorResource(ProxyResource): - """Represents a and external administrator to be created. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login account name. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAdministratorResource, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, properties, location: str, identity=None, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.identity = identity - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags - - -class ServerKey(ProxyResource): - """A MySQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = uri - self.creation_date = None - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id of the private endpoint connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status, description: str, **kwargs) -> None: - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, *, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.infrastructure_encryption = infrastructure_encryption - self.public_network_access = public_network_access - self.storage_profile = storage_profile - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, *, administrator_login: str, administrator_login_password: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7', - '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_server_id: str, restore_point_in_time, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7', '8.0' - :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, identity=None, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, minimal_tls_version=None, public_network_access=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - self.identity = identity - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.public_network_access = public_network_access - self.replication_role = replication_role - self.tags = tags - - -class ServerUpgradeParameters(Model): - """ServerUpgradeParameters. - - :param target_server_version: Represents an server storage profile. - :type target_server_version: str - """ - - _attribute_map = { - 'target_server_version': {'key': 'properties.targetServerVersion', 'type': 'str'}, - } - - def __init__(self, *, target_server_version: str=None, **kwargs) -> None: - super(ServerUpgradeParameters, self).__init__(**kwargs) - self.target_server_version = target_server_version - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'name': {'required': True}, - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mysql.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None, storage_mb: int=None, storage_autogrow=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb - self.storage_autogrow = storage_autogrow - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TopQueryStatisticsInput(Model): - """Input to get top query statistics. - - All required parameters must be populated in order to send to Azure. - - :param number_of_top_queries: Required. Max number of top queries to - return. - :type number_of_top_queries: int - :param aggregation_function: Required. Aggregation function name. - :type aggregation_function: str - :param observed_metric: Required. Observed metric name. - :type observed_metric: str - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'number_of_top_queries': {'required': True}, - 'aggregation_function': {'required': True}, - 'observed_metric': {'required': True}, - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, - 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, - 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, *, number_of_top_queries: int, aggregation_function: str, observed_metric: str, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: - super(TopQueryStatisticsInput, self).__init__(**kwargs) - self.number_of_top_queries = number_of_top_queries - self.aggregation_function = aggregation_function - self.observed_metric = observed_metric - self.observation_start_time = observation_start_time - self.observation_end_time = observation_end_time - self.aggregation_window = aggregation_window - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None - - -class WaitStatistic(ProxyResource): - """Represents a Wait Statistic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_time: Observation start time. - :type start_time: datetime - :param end_time: Observation end time. - :type end_time: datetime - :param event_name: Wait event name. - :type event_name: str - :param event_type_name: Wait event type name. - :type event_type_name: str - :param query_id: Database query identifier. - :type query_id: long - :param database_name: Database Name. - :type database_name: str - :param user_id: Database user identifier. - :type user_id: long - :param count: Wait event count observed in this time interval. - :type count: long - :param total_time_in_ms: Total time of wait in milliseconds in this time - interval. - :type total_time_in_ms: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'event_name': {'key': 'properties.eventName', 'type': 'str'}, - 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'long'}, - 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'long'}, - 'count': {'key': 'properties.count', 'type': 'long'}, - 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, start_time=None, end_time=None, event_name: str=None, event_type_name: str=None, query_id: int=None, database_name: str=None, user_id: int=None, count: int=None, total_time_in_ms: float=None, **kwargs) -> None: - super(WaitStatistic, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.event_name = event_name - self.event_type_name = event_type_name - self.query_id = query_id - self.database_name = database_name - self.user_id = user_id - self.count = count - self.total_time_in_ms = total_time_in_ms - - -class WaitStatisticsInput(Model): - """Input to get wait statistics. - - All required parameters must be populated in order to send to Azure. - - :param observation_start_time: Required. Observation start time. - :type observation_start_time: datetime - :param observation_end_time: Required. Observation end time. - :type observation_end_time: datetime - :param aggregation_window: Required. Aggregation interval type in ISO 8601 - format. - :type aggregation_window: str - """ - - _validation = { - 'observation_start_time': {'required': True}, - 'observation_end_time': {'required': True}, - 'aggregation_window': {'required': True}, - } - - _attribute_map = { - 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, - 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, - 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, - } - - def __init__(self, *, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: - super(WaitStatisticsInput, self).__init__(**kwargs) - self.observation_start_time = observation_start_time - self.observation_end_time = observation_end_time - self.aggregation_window = aggregation_window diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_my_sql_management_client_enums.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_my_sql_management_client_enums.py deleted file mode 100644 index 926d8bd4642..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_my_sql_management_client_enums.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ServerVersion(str, Enum): - - five_full_stop_six = "5.6" - five_full_stop_seven = "5.7" - eight_full_stop_zero = "8.0" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class MinimalTlsVersionEnum(str, Enum): - - tls1_0 = "TLS1_0" - tls1_1 = "TLS1_1" - tls1_2 = "TLS1_2" - tls_enforcement_disabled = "TLSEnforcementDisabled" - - -class InfrastructureEncryption(str, Enum): - - enabled = "Enabled" #: Default value for single layer of encryption for data at rest. - disabled = "Disabled" #: Additional (2nd) layer of encryption for data at rest - - -class PublicNetworkAccessEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class PrivateLinkServiceConnectionStateStatus(str, Enum): - - approved = "Approved" - pending = "Pending" - rejected = "Rejected" - disconnected = "Disconnected" - - -class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): - - none = "None" - - -class PrivateEndpointProvisioningState(str, Enum): - - approving = "Approving" - ready = "Ready" - dropping = "Dropping" - failed = "Failed" - rejecting = "Rejecting" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - inaccessible = "Inaccessible" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class StorageAutogrow(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_paged_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_paged_models.py deleted file mode 100644 index 6b4fde833cc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/models/_paged_models.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) -class ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) -class LogFilePaged(Paged): - """ - A paging container for iterating over a list of :class:`LogFile ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LogFile]'} - } - - def __init__(self, *args, **kwargs): - - super(LogFilePaged, self).__init__(*args, **kwargs) -class ServerAdministratorResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAdministratorResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAdministratorResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAdministratorResourcePaged, self).__init__(*args, **kwargs) -class PerformanceTierPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`PerformanceTierProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) -class QueryTextPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryText ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryText]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryTextPaged, self).__init__(*args, **kwargs) -class QueryStatisticPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryStatistic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryStatistic]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryStatisticPaged, self).__init__(*args, **kwargs) -class WaitStatisticPaged(Paged): - """ - A paging container for iterating over a list of :class:`WaitStatistic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WaitStatistic]'} - } - - def __init__(self, *args, **kwargs): - - super(WaitStatisticPaged, self).__init__(*args, **kwargs) -class AdvisorPaged(Paged): - """ - A paging container for iterating over a list of :class:`Advisor ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Advisor]'} - } - - def __init__(self, *args, **kwargs): - - super(AdvisorPaged, self).__init__(*args, **kwargs) -class RecommendationActionPaged(Paged): - """ - A paging container for iterating over a list of :class:`RecommendationAction ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RecommendationAction]'} - } - - def __init__(self, *args, **kwargs): - - super(RecommendationActionPaged, self).__init__(*args, **kwargs) -class PrivateEndpointConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) -class PrivateLinkResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateLinkResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/__init__.py deleted file mode 100644 index 10badf36caa..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._servers_operations import ServersOperations -from ._replicas_operations import ReplicasOperations -from ._firewall_rules_operations import FirewallRulesOperations -from ._virtual_network_rules_operations import VirtualNetworkRulesOperations -from ._databases_operations import DatabasesOperations -from ._configurations_operations import ConfigurationsOperations -from ._log_files_operations import LogFilesOperations -from ._server_administrators_operations import ServerAdministratorsOperations -from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations -from ._check_name_availability_operations import CheckNameAvailabilityOperations -from ._operations import Operations -from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from ._query_texts_operations import QueryTextsOperations -from ._top_query_statistics_operations import TopQueryStatisticsOperations -from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations -from ._recommended_actions_operations import RecommendedActionsOperations -from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._server_keys_operations import ServerKeysOperations -from ._my_sql_management_client_operations import MySQLManagementClientOperationsMixin - -__all__ = [ - 'ServersOperations', - 'ReplicasOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'ServerAdministratorsOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'Operations', - 'ServerSecurityAlertPoliciesOperations', - 'QueryTextsOperations', - 'TopQueryStatisticsOperations', - 'WaitStatisticsOperations', - 'AdvisorsOperations', - 'RecommendedActionsOperations', - 'LocationBasedRecommendedActionSessionsOperationStatusOperations', - 'LocationBasedRecommendedActionSessionsResultOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ServerKeysOperations', - 'MySQLManagementClientOperationsMixin', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_advisors_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_advisors_operations.py deleted file mode 100644 index b20c39649dd..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_advisors_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AdvisorsOperations(object): - """AdvisorsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, advisor_name, custom_headers=None, raw=False, **operation_config): - """Get a recommendation action advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Advisor or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.Advisor or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Advisor', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List recommendation action advisors. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Advisor - :rtype: - ~azure.mgmt.rdbms.mysql.models.AdvisorPaged[~azure.mgmt.rdbms.mysql.models.Advisor] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_check_name_availability_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_check_name_availability_operations.py deleted file mode 100644 index d0886f04dd9..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_check_name_availability_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckNameAvailabilityOperations(object): - """CheckNameAvailabilityOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def execute( - self, name, type=None, custom_headers=None, raw=False, **operation_config): - """Check the availability of name for resource. - - :param name: Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.NameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_availability_request = models.NameAvailabilityRequest(name=name, type=type) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/checkNameAvailability'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_configurations_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_configurations_operations.py deleted file mode 100644 index 88749b62130..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ConfigurationsOperations(object): - """ConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Configuration(value=value, source=source) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Configuration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a configuration of a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param value: Value of the configuration. - :type value: str - :param source: Source of the configuration. - :type source: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Configuration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - configuration_name=configuration_name, - value=value, - source=source, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations/{configurationName}'} - - def get( - self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a configuration of server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Configuration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.Configuration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations/{configurationName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the configurations in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Configuration - :rtype: - ~azure.mgmt.rdbms.mysql.models.ConfigurationPaged[~azure.mgmt.rdbms.mysql.models.Configuration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/configurations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_databases_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_databases_operations.py deleted file mode 100644 index 58c241fccc2..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_databases_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DatabasesOperations(object): - """DatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Database(charset=charset, collation=collation) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Database') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - if response.status_code == 201: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new database or updates an existing database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - charset=charset, - collation=collation, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Database or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.Database or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases/{databaseName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the databases in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Database - :rtype: - ~azure.mgmt.rdbms.mysql.models.DatabasePaged[~azure.mgmt.rdbms.mysql.models.Database] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/databases'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_firewall_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_firewall_rules_operations.py deleted file mode 100644 index eef0dc56adb..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_firewall_rules_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FirewallRulesOperations(object): - """FirewallRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): - parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'FirewallRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - if response.status_code == 201: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new firewall rule or updates an existing firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the server firewall - rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: The end IP address of the server firewall rule. - Must be IPv4 format. - :type end_ip_address: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.FirewallRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - start_ip_address=start_ip_address, - end_ip_address=end_ip_address, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FirewallRule - :rtype: - ~azure.mgmt.rdbms.mysql.models.FirewallRulePaged[~azure.mgmt.rdbms.mysql.models.FirewallRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/firewallRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_performance_tier_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_performance_tier_operations.py deleted file mode 100644 index f25fc84ca62..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_performance_tier_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedPerformanceTierOperations(object): - """LocationBasedPerformanceTierOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, location_name, custom_headers=None, raw=False, **operation_config): - """List all the performance tiers at specified location in a given - subscription. - - :param location_name: The name of the location. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerformanceTierProperties - :rtype: - ~azure.mgmt.rdbms.mysql.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierProperties] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/locations/{locationName}/performanceTiers'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py deleted file mode 100644 index df967164ff7..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedRecommendedActionSessionsOperationStatusOperations(object): - """LocationBasedRecommendedActionSessionsOperationStatusOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Recommendation action session operation status. - - :param location_name: The name of the location. - :type location_name: str - :param operation_id: The operation identifier. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendedActionSessionsOperationStatus or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.rdbms.mysql.models.RecommendedActionSessionsOperationStatus - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendedActionSessionsOperationStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_result_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_result_operations.py deleted file mode 100644 index df18d0adc0c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_location_based_recommended_action_sessions_result_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedRecommendedActionSessionsResultOperations(object): - """LocationBasedRecommendedActionSessionsResultOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Recommendation action session operation result. - - :param location_name: The name of the location. - :type location_name: str - :param operation_id: The operation identifier. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RecommendationAction - :rtype: - ~azure.mgmt.rdbms.mysql.models.RecommendationActionPaged[~azure.mgmt.rdbms.mysql.models.RecommendationAction] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_log_files_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_log_files_operations.py deleted file mode 100644 index f9ed6eaa610..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_log_files_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LogFilesOperations(object): - """LogFilesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the log files in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LogFile - :rtype: - ~azure.mgmt.rdbms.mysql.models.LogFilePaged[~azure.mgmt.rdbms.mysql.models.LogFile] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/logFiles'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_my_sql_management_client_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_my_sql_management_client_operations.py deleted file mode 100644 index 100feafeb6c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_my_sql_management_client_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class MySQLManagementClientOperationsMixin(object): - - - def _create_recommended_action_session_initial( - self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, **operation_config): - api_version = "2018-06-01" - - # Construct URL - url = self.create_recommended_action_session.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - query_parameters['databaseName'] = self._serialize.query("database_name", database_name, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def create_recommended_action_session( - self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Create recommendation action session for the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._create_recommended_action_session_initial( - resource_group_name=resource_group_name, - server_name=server_name, - advisor_name=advisor_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_recommended_action_session.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_operations.py deleted file mode 100644 index 2027cd02502..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_operations.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DBForMySQL/operations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_endpoint_connections_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index b91f8c8a4e3..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,490 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param private_endpoint: Private endpoint which the connection belongs - to. - :type private_endpoint: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateProperty - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint=private_endpoint, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _update_tags_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on private endpoint connection. - - Updates private endpoint connection with the specified tags. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets all private endpoint connections on a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateEndpointConnection - :rtype: - ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnectionPaged[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_link_resources_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_link_resources_operations.py deleted file mode 100644 index 97fc4de5bde..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets the private link resources for MySQL server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateLinkResource - :rtype: - ~azure.mgmt.rdbms.mysql.models.PrivateLinkResourcePaged[~azure.mgmt.rdbms.mysql.models.PrivateLinkResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources'} - - def get( - self, resource_group_name, server_name, group_name, custom_headers=None, raw=False, **operation_config): - """Gets a private link resource for MySQL server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param group_name: The name of the private link resource. - :type group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'groupName': self._serialize.url("group_name", group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources/{groupName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_query_texts_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_query_texts_operations.py deleted file mode 100644 index 6e944718dcc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_query_texts_operations.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class QueryTextsOperations(object): - """QueryTextsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, query_id, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store query texts for the queryId. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_id: The Query-Store query identifier. - :type query_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QueryText or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.QueryText or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'queryId': self._serialize.url("query_id", query_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('QueryText', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts/{queryId}'} - - def list_by_server( - self, resource_group_name, server_name, query_ids, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store query texts for specified queryIds. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_ids: The query identifiers - :type query_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of QueryText - :rtype: - ~azure.mgmt.rdbms.mysql.models.QueryTextPaged[~azure.mgmt.rdbms.mysql.models.QueryText] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - query_parameters['queryIds'] = self._serialize.query("query_ids", query_ids, '[str]', div=',') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.QueryTextPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_recommended_actions_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_recommended_actions_operations.py deleted file mode 100644 index d547efd7215..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_recommended_actions_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RecommendedActionsOperations(object): - """RecommendedActionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, advisor_name, recommended_action_name, custom_headers=None, raw=False, **operation_config): - """Retrieve recommended actions from the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param recommended_action_name: The recommended action name. - :type recommended_action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecommendationAction or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.RecommendationAction or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str'), - 'recommendedActionName': self._serialize.url("recommended_action_name", recommended_action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RecommendationAction', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}'} - - def list_by_server( - self, resource_group_name, server_name, advisor_name, session_id=None, custom_headers=None, raw=False, **operation_config): - """Retrieve recommended actions from the advisor. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param session_id: The recommendation action session identifier. - :type session_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RecommendationAction - :rtype: - ~azure.mgmt.rdbms.mysql.models.RecommendationActionPaged[~azure.mgmt.rdbms.mysql.models.RecommendationAction] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if session_id is not None: - query_parameters['sessionId'] = self._serialize.query("session_id", session_id, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_replicas_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_replicas_operations.py deleted file mode 100644 index cf32b2124e3..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_replicas_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReplicasOperations(object): - """ReplicasOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the replicas for a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql.models.ServerPaged[~azure.mgmt.rdbms.mysql.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/replicas'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_administrators_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_administrators_operations.py deleted file mode 100644 index 2289403946b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_administrators_operations.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerAdministratorsOperations(object): - """ServerAdministratorsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a AAD server administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerAdministratorResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, properties, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(properties, 'ServerAdministratorResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerAdministratorResource', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or update active directory administrator on an existing server. - The update action will overwrite the existing administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param properties: The required parameters for creating or updating an - AAD server administrator. - :type properties: - ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerAdministratorResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - properties=properties, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes server active directory administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/Administrators/activeDirectory'} - - def list( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns a list of server Administrators. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServerAdministratorResource - :rtype: - ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResourcePaged[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerAdministratorResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/administrators'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_keys_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_keys_operations.py deleted file mode 100644 index 7e4c360fa60..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_keys_operations.py +++ /dev/null @@ -1,374 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerKeysOperations(object): - """ServerKeysOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Server keys. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServerKey - :rtype: - ~azure.mgmt.rdbms.mysql.models.ServerKeyPaged[~azure.mgmt.rdbms.mysql.models.ServerKey] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys'} - - def get( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config): - """Gets a MySQL Server key. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the MySQL Server key to be retrieved. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.ServerKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}'} - - - def _create_or_update_initial( - self, server_name, key_name, resource_group_name, uri=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerKey(uri=uri) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerKey') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, server_name, key_name, resource_group_name, uri=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a MySQL Server key. - - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the MySQL Server key to be operated on - (updated or created). - :type key_name: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param uri: The URI of the key. - :type uri: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerKey or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.ServerKey] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.ServerKey]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - server_name=server_name, - key_name=key_name, - resource_group_name=resource_group_name, - uri=uri, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}'} - - - def _delete_initial( - self, server_name, key_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, server_name, key_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the MySQL Server key with the given name. - - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the MySQL Server key to be deleted. - :type key_name: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - server_name=server_name, - key_name=key_name, - resource_group_name=resource_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_security_alert_policies_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_security_alert_policies_operations.py deleted file mode 100644 index 0f7cac27872..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_server_security_alert_policies_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "Default" - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_servers_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_servers_operations.py deleted file mode 100644 index 725ffe6c275..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_servers_operations.py +++ /dev/null @@ -1,875 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServersOperations(object): - """ServersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-12-01" - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerForCreate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - if response.status_code == 201: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new server or updates an existing server. The update action - will overwrite the existing server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for creating or updating a - server. - :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerForCreate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-12-01" - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing server. The request body can contain one to many of - the properties present in the normal server definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for updating a server. - :type parameters: - ~azure.mgmt.rdbms.mysql.models.ServerUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-12-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Server or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-12-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql.models.ServerPaged[~azure.mgmt.rdbms.mysql.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2017-12-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql.models.ServerPaged[~azure.mgmt.rdbms.mysql.models.Server] - :raises: :class:`CloudError` - """ - api_version = "2017-12-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/servers'} - - - def _restart_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-12-01" - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/restart'} - - - def _start_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2020-01-01" - - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a stopped server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/start'} - - - def _stop_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - api_version = "2020-01-01" - - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a running server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/stop'} - - - def _upgrade_initial( - self, resource_group_name, server_name, target_server_version=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerUpgradeParameters(target_server_version=target_server_version) - - api_version = "2020-01-01" - - # Construct URL - url = self.upgrade.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerUpgradeParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def upgrade( - self, resource_group_name, server_name, target_server_version=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade server version. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param target_server_version: Represents an server storage profile. - :type target_server_version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_initial( - resource_group_name=resource_group_name, - server_name=server_name, - target_server_version=target_server_version, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/upgrade'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_top_query_statistics_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_top_query_statistics_operations.py deleted file mode 100644 index a7c02767679..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_top_query_statistics_operations.py +++ /dev/null @@ -1,187 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TopQueryStatisticsOperations(object): - """TopQueryStatisticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, query_statistic_id, custom_headers=None, raw=False, **operation_config): - """Retrieve the query statistic for specified identifier. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param query_statistic_id: The Query Statistic identifier. - :type query_statistic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QueryStatistic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.QueryStatistic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'queryStatisticId': self._serialize.url("query_statistic_id", query_statistic_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('QueryStatistic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics/{queryStatisticId}'} - - def list_by_server( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - """Retrieve the Query-Store top queries for specified metric and - aggregation. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for retrieving top query - statistics. - :type parameters: - ~azure.mgmt.rdbms.mysql.models.TopQueryStatisticsInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of QueryStatistic - :rtype: - ~azure.mgmt.rdbms.mysql.models.QueryStatisticPaged[~azure.mgmt.rdbms.mysql.models.QueryStatistic] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TopQueryStatisticsInput') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.QueryStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_virtual_network_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_virtual_network_rules_operations.py deleted file mode 100644 index 3b0f7c80b07..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_virtual_network_rules_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualNetworkRulesOperations(object): - """VirtualNetworkRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetworkRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): - parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualNetworkRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an existing virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param virtual_network_subnet_id: The ARM resource id of the virtual - network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule - before the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - virtual_network_subnet_id=virtual_network_subnet_id, - ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the virtual network rule with the given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual network rules in a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualNetworkRule - :rtype: - ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/virtualNetworkRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_wait_statistics_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_wait_statistics_operations.py deleted file mode 100644 index 147057fb84d..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/operations/_wait_statistics_operations.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WaitStatisticsOperations(object): - """WaitStatisticsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, wait_statistics_id, custom_headers=None, raw=False, **operation_config): - """Retrieve wait statistics for specified identifier. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param wait_statistics_id: The Wait Statistic identifier. - :type wait_statistics_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WaitStatistic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql.models.WaitStatistic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'waitStatisticsId': self._serialize.url("wait_statistics_id", wait_statistics_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WaitStatistic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics/{waitStatisticsId}'} - - def list_by_server( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - """Retrieve wait statistics for specified aggregation window. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for retrieving wait - statistics. - :type parameters: ~azure.mgmt.rdbms.mysql.models.WaitStatisticsInput - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WaitStatistic - :rtype: - ~azure.mgmt.rdbms.mysql.models.WaitStatisticPaged[~azure.mgmt.rdbms.mysql.models.WaitStatistic] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'WaitStatisticsInput') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WaitStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/version.py deleted file mode 100644 index e5978466adb..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2017-12-01" - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/__init__.py deleted file mode 100644 index 9fc6ca804bc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import MySQLManagementClientConfiguration -from ._my_sql_management_client import MySQLManagementClient -__all__ = ['MySQLManagementClient', 'MySQLManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_configuration.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_configuration.py deleted file mode 100644 index 21838cc23c5..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class MySQLManagementClientConfiguration(AzureConfiguration): - """Configuration for MySQLManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(MySQLManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_my_sql_management_client.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_my_sql_management_client.py deleted file mode 100644 index 97bd05d1a29..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/_my_sql_management_client.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import MySQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import ServerKeysOperations -from .operations import FirewallRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LocationBasedCapabilitiesOperations -from .operations import CheckVirtualNetworkSubnetUsageOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from . import models - - -class MySQLManagementClient(SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - - :ivar config: Configuration for client. - :vartype config: MySQLManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.mysql_flexibleservers.operations.ServersOperations - :ivar replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.mysql_flexibleservers.operations.ReplicasOperations - :ivar server_keys: ServerKeys operations - :vartype server_keys: azure.mgmt.rdbms.mysql_flexibleservers.operations.ServerKeysOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql_flexibleservers.operations.FirewallRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.mysql_flexibleservers.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.mysql_flexibleservers.operations.ConfigurationsOperations - :ivar location_based_capabilities: LocationBasedCapabilities operations - :vartype location_based_capabilities: azure.mgmt.rdbms.mysql_flexibleservers.operations.LocationBasedCapabilitiesOperations - :ivar check_virtual_network_subnet_usage: CheckVirtualNetworkSubnetUsage operations - :vartype check_virtual_network_subnet_usage: azure.mgmt.rdbms.mysql_flexibleservers.operations.CheckVirtualNetworkSubnetUsageOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql_flexibleservers.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql_flexibleservers.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MySQLManagementClientConfiguration(credentials, subscription_id, base_url) - super(MySQLManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-07-01-privatepreview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_capabilities = LocationBasedCapabilitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_virtual_network_subnet_usage = CheckVirtualNetworkSubnetUsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/__init__.py deleted file mode 100644 index 6522f347689..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/__init__.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AzureEntityResource - from ._models_py3 import CapabilityProperties - from ._models_py3 import Configuration - from ._models_py3 import Database - from ._models_py3 import DelegatedSubnetArguments - from ._models_py3 import DelegatedSubnetUsage - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import FirewallRule - from ._models_py3 import Identity - from ._models_py3 import MaintenanceWindow - from ._models_py3 import NameAvailability - from ._models_py3 import NameAvailabilityRequest - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import Plan - from ._models_py3 import ProxyResource - from ._models_py3 import Resource - from ._models_py3 import ResourceModelWithAllowedPropertySet - from ._models_py3 import ResourceModelWithAllowedPropertySetIdentity - from ._models_py3 import ResourceModelWithAllowedPropertySetPlan - from ._models_py3 import ResourceModelWithAllowedPropertySetSku - from ._models_py3 import Server - from ._models_py3 import ServerEditionCapability - from ._models_py3 import ServerForUpdate - from ._models_py3 import ServerKey - from ._models_py3 import ServerVersionCapability - from ._models_py3 import Sku - from ._models_py3 import StorageEditionCapability - from ._models_py3 import StorageMBCapability - from ._models_py3 import StorageProfile - from ._models_py3 import TrackedResource - from ._models_py3 import VcoreCapability - from ._models_py3 import VirtualNetworkSubnetUsageParameter - from ._models_py3 import VirtualNetworkSubnetUsageResult -except (SyntaxError, ImportError): - from ._models import AzureEntityResource - from ._models import CapabilityProperties - from ._models import Configuration - from ._models import Database - from ._models import DelegatedSubnetArguments - from ._models import DelegatedSubnetUsage - from ._models import ErrorAdditionalInfo - from ._models import ErrorResponse - from ._models import FirewallRule - from ._models import Identity - from ._models import MaintenanceWindow - from ._models import NameAvailability - from ._models import NameAvailabilityRequest - from ._models import Operation - from ._models import OperationDisplay - from ._models import OperationListResult - from ._models import Plan - from ._models import ProxyResource - from ._models import Resource - from ._models import ResourceModelWithAllowedPropertySet - from ._models import ResourceModelWithAllowedPropertySetIdentity - from ._models import ResourceModelWithAllowedPropertySetPlan - from ._models import ResourceModelWithAllowedPropertySetSku - from ._models import Server - from ._models import ServerEditionCapability - from ._models import ServerForUpdate - from ._models import ServerKey - from ._models import ServerVersionCapability - from ._models import Sku - from ._models import StorageEditionCapability - from ._models import StorageMBCapability - from ._models import StorageProfile - from ._models import TrackedResource - from ._models import VcoreCapability - from ._models import VirtualNetworkSubnetUsageParameter - from ._models import VirtualNetworkSubnetUsageResult -from ._paged_models import CapabilityPropertiesPaged -from ._paged_models import ConfigurationPaged -from ._paged_models import DatabasePaged -from ._paged_models import FirewallRulePaged -from ._paged_models import ServerKeyPaged -from ._paged_models import ServerPaged -from ._my_sql_management_client_enums import ( - ServerVersion, - SslEnforcementEnum, - InfrastructureEncryptionEnum, - PublicNetworkAccessEnum, - HaEnabledEnum, - StorageAutogrow, - SkuTier, - ServerState, - ServerHAState, - CreateMode, - ResourceIdentityType, - IsReadOnly, - IsConfigPendingRestart, - IsDynamicConfig, - OperationOrigin, -) - -__all__ = [ - 'AzureEntityResource', - 'CapabilityProperties', - 'Configuration', - 'Database', - 'DelegatedSubnetArguments', - 'DelegatedSubnetUsage', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'FirewallRule', - 'Identity', - 'MaintenanceWindow', - 'NameAvailability', - 'NameAvailabilityRequest', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'Plan', - 'ProxyResource', - 'Resource', - 'ResourceModelWithAllowedPropertySet', - 'ResourceModelWithAllowedPropertySetIdentity', - 'ResourceModelWithAllowedPropertySetPlan', - 'ResourceModelWithAllowedPropertySetSku', - 'Server', - 'ServerEditionCapability', - 'ServerForUpdate', - 'ServerKey', - 'ServerVersionCapability', - 'Sku', - 'StorageEditionCapability', - 'StorageMBCapability', - 'StorageProfile', - 'TrackedResource', - 'VcoreCapability', - 'VirtualNetworkSubnetUsageParameter', - 'VirtualNetworkSubnetUsageResult', - 'ServerPaged', - 'ServerKeyPaged', - 'FirewallRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'CapabilityPropertiesPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'InfrastructureEncryptionEnum', - 'PublicNetworkAccessEnum', - 'HaEnabledEnum', - 'StorageAutogrow', - 'SkuTier', - 'ServerState', - 'ServerHAState', - 'CreateMode', - 'ResourceIdentityType', - 'IsReadOnly', - 'IsConfigPendingRestart', - 'IsDynamicConfig', - 'OperationOrigin', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models.py deleted file mode 100644 index 06165f1209b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models.py +++ /dev/null @@ -1,1507 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CapabilityProperties(Model): - """Location capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar zone: zone name - :vartype zone: str - :ivar supported_flexible_server_editions: A list of supported flexible - server editions. - :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerEditionCapability] - """ - - _validation = { - 'zone': {'readonly': True}, - 'supported_flexible_server_editions': {'readonly': True}, - } - - _attribute_map = { - 'zone': {'key': 'zone', 'type': 'str'}, - 'supported_flexible_server_editions': {'key': 'supportedFlexibleServerEditions', 'type': '[ServerEditionCapability]'}, - } - - def __init__(self, **kwargs): - super(CapabilityProperties, self).__init__(**kwargs) - self.zone = None - self.supported_flexible_server_editions = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: The resource management error response. - :type error: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - :ivar is_read_only: If is the configuration read only. Possible values - include: 'True', 'False' - :vartype is_read_only: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsReadOnly - :ivar is_config_pending_restart: If is the configuration pending restart - or not. Possible values include: 'True', 'False' - :vartype is_config_pending_restart: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsConfigPendingRestart - :ivar is_dynamic_config: If is the configuration dynamic. Possible values - include: 'True', 'False' - :vartype is_dynamic_config: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsDynamicConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - 'is_read_only': {'readonly': True}, - 'is_config_pending_restart': {'readonly': True}, - 'is_dynamic_config': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'is_read_only': {'key': 'properties.isReadOnly', 'type': 'str'}, - 'is_config_pending_restart': {'key': 'properties.isConfigPendingRestart', 'type': 'str'}, - 'is_dynamic_config': {'key': 'properties.isDynamicConfig', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) - self.is_read_only = None - self.is_config_pending_restart = None - self.is_dynamic_config = None - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) - - -class DelegatedSubnetArguments(Model): - """Delegated subnet arguments of a server. - - :param subnet_arm_resource_id: delegated subnet arm resource id. - :type subnet_arm_resource_id: str - """ - - _attribute_map = { - 'subnet_arm_resource_id': {'key': 'subnetArmResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DelegatedSubnetArguments, self).__init__(**kwargs) - self.subnet_arm_resource_id = kwargs.get('subnet_arm_resource_id', None) - - -class DelegatedSubnetUsage(Model): - """Delegated subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_name: name of the subnet - :vartype subnet_name: str - :ivar usage: Number of used delegated subnets - :vartype usage: long - """ - - _validation = { - 'subnet_name': {'readonly': True}, - 'usage': {'readonly': True}, - } - - _attribute_map = { - 'subnet_name': {'key': 'subnetName', 'type': 'str'}, - 'usage': {'key': 'usage', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(DelegatedSubnetUsage, self).__init__(**kwargs) - self.subnet_name = None - self.usage = None - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class MaintenanceWindow(Model): - """Maintenance window of a server. - - :param custom_window: indicates whether custom window is enabled or - disabled - :type custom_window: str - :param start_hour: start hour for maintenance window - :type start_hour: int - :param start_minute: start minute for maintenance window - :type start_minute: int - :param day_of_week: day of week for maintenance window - :type day_of_week: int - """ - - _attribute_map = { - 'custom_window': {'key': 'customWindow', 'type': 'str'}, - 'start_hour': {'key': 'startHour', 'type': 'int'}, - 'start_minute': {'key': 'startMinute', 'type': 'int'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(MaintenanceWindow, self).__init__(**kwargs) - self.custom_window = kwargs.get('custom_window', None) - self.start_hour = kwargs.get('start_hour', None) - self.start_minute = kwargs.get('start_minute', None) - self.day_of_week = kwargs.get('day_of_week', None) - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class Plan(Model): - """Plan for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) - self.version = kwargs.get('version', None) - - -class ResourceModelWithAllowedPropertySet(Model): - """The resource model definition containing the full set of allowed properties - for a resource. Except properties bag, there cannot be a top level property - outside of this set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :param managed_by: The fully qualified resource ID of the resource that - manages this resource. Indicates if this resource is managed by another - azure resource. If this is present, complete mode deployment will not - delete the resource if it is removed from the template since it is managed - by another resource. - :type managed_by: str - :param kind: Metadata used by portal/tooling/etc to render different UX - experiences for resources of the same type; e.g. ApiApps are a kind of - Microsoft.Web/sites type. If supported, the resource provider must - validate and persist this value. - :type kind: str - :ivar etag: The etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal etag - convention. Entity tags are used for comparing two or more entities from - the same requested resource. HTTP/1.1 uses entity tags in the etag - (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - and If-Range (section 14.27) header fields. - :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: - :type identity: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetIdentity - :param sku: - :type sku: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetSku - :param plan: - :type plan: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetPlan - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, - 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, - 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.managed_by = kwargs.get('managed_by', None) - self.kind = kwargs.get('kind', None) - self.etag = None - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - - -class ResourceModelWithAllowedPropertySetIdentity(Identity): - """ResourceModelWithAllowedPropertySetIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(**kwargs) - - -class ResourceModelWithAllowedPropertySetPlan(Plan): - """ResourceModelWithAllowedPropertySetPlan. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetPlan, self).__init__(**kwargs) - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, e.g. Standard_D32s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. - GeneralPurpose. Possible values include: 'Burstable', 'GeneralPurpose', - 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ResourceModelWithAllowedPropertySetSku(Sku): - """ResourceModelWithAllowedPropertySetSku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, e.g. Standard_D32s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. - GeneralPurpose. Possible values include: 'Burstable', 'GeneralPurpose', - 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetSku, self).__init__(**kwargs) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Identity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param administrator_login_password: The password of the administrator - login (required for server creation). - :type administrator_login_password: str - :param version: Server version. Possible values include: '5.7' - :type version: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.InfrastructureEncryptionEnum - :ivar state: The state of a server. Possible values include: 'Ready', - 'Dropping', 'Disabled', 'Starting', 'Stopping', 'Stopped', 'Updating' - :vartype state: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerState - :ivar ha_state: The state of a HA server. Possible values include: - 'NotEnabled', 'CreatingStandby', 'ReplicatingData', 'FailingOver', - 'Healthy', 'RemovingStandby' - :vartype ha_state: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerHAState - :param ha_enabled: Enable HA or not for a server. Possible values include: - 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum - :ivar fully_qualified_domain_name: The fully qualified domain name of a - server. - :vartype fully_qualified_domain_name: str - :ivar earliest_restore_date: Earliest restore point creation time (ISO8601 - format) - :vartype earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile - :param replication_role: The replication role. - :type replication_role: str - :ivar replica_capacity: The maximum number of replicas that a primary - server can have. - :vartype replica_capacity: int - :ivar public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :vartype public_network_access: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.PublicNetworkAccessEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow - :param source_server_id: The source MySQL server id. - :type source_server_id: str - :param restore_point_in_time: Restore point creation time (ISO8601 - format), specifying the time to restore from. - :type restore_point_in_time: datetime - :param availability_zone: availability Zone information of the server. - :type availability_zone: str - :ivar standby_availability_zone: availability Zone information of the - server. - :vartype standby_availability_zone: str - :ivar byok_enforcement: Status showing whether the data encryption is - enabled with customer-managed keys. - :vartype byok_enforcement: str - :param delegated_subnet_arguments: Delegated subnet arguments. - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments - :param create_mode: The mode to create a new MySQL server. Possible values - include: 'Default', 'PointInTimeRestore', 'Replica' - :type create_mode: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.CreateMode - :param server_tags: Application-specific metadata in the form of key-value - pairs. - :type server_tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'state': {'readonly': True}, - 'ha_state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'replica_capacity': {'readonly': True, 'minimum': 0}, - 'public_network_access': {'readonly': True}, - 'standby_availability_zone': {'readonly': True}, - 'byok_enforcement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'ha_state': {'key': 'properties.haState', 'type': 'str'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'source_server_id': {'key': 'properties.sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'availability_zone': {'key': 'properties.availabilityZone', 'type': 'str'}, - 'standby_availability_zone': {'key': 'properties.standbyAvailabilityZone', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'DelegatedSubnetArguments'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'server_tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.infrastructure_encryption = kwargs.get('infrastructure_encryption', None) - self.state = None - self.ha_state = None - self.ha_enabled = kwargs.get('ha_enabled', None) - self.fully_qualified_domain_name = None - self.earliest_restore_date = None - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.replica_capacity = None - self.public_network_access = None - self.maintenance_window = kwargs.get('maintenance_window', None) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.availability_zone = kwargs.get('availability_zone', None) - self.standby_availability_zone = None - self.byok_enforcement = None - self.delegated_subnet_arguments = kwargs.get('delegated_subnet_arguments', None) - self.create_mode = kwargs.get('create_mode', None) - self.server_tags = kwargs.get('server_tags', None) - - -class ServerEditionCapability(Model): - """Server edition capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Server edition name - :vartype name: str - :ivar supported_storage_editions: A list of supported storage editions - :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageEditionCapability] - :ivar supported_server_versions: A list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersionCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_editions': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_editions': {'key': 'supportedStorageEditions', 'type': '[StorageEditionCapability]'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - } - - def __init__(self, **kwargs): - super(ServerEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_editions = None - self.supported_server_versions = None - - -class ServerForUpdate(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum - :param delegated_subnet_arguments: Delegated subnet arguments. - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments - :param ha_enabled: Enable HA or not for a server. Possible values include: - 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'DelegatedSubnetArguments'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForUpdate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.delegated_subnet_arguments = kwargs.get('delegated_subnet_arguments', None) - self.ha_enabled = kwargs.get('ha_enabled', None) - self.maintenance_window = kwargs.get('maintenance_window', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) - - -class ServerKey(ProxyResource): - """A MySQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = kwargs.get('uri', None) - self.creation_date = None - - -class ServerVersionCapability(Model): - """Server version capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: server version - :vartype name: str - :ivar supported_vcores: A list of supported Vcores - :vartype supported_vcores: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.VcoreCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_vcores': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_vcores': {'key': 'supportedVcores', 'type': '[VcoreCapability]'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_vcores = None - - -class StorageEditionCapability(Model): - """storage edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage edition name - :vartype name: str - :ivar min_storage_size: The minimal supported storage size in MB - :vartype min_storage_size: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability - :ivar max_storage_size: The maximum supported storage size in MB - :vartype max_storage_size: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability - :ivar min_backup_retention_days: Minimal backup retention days - :vartype min_backup_retention_days: long - :ivar max_backup_retention_days: Maximum backup retention days - :vartype max_backup_retention_days: long - """ - - _validation = { - 'name': {'readonly': True}, - 'min_storage_size': {'readonly': True}, - 'max_storage_size': {'readonly': True}, - 'min_backup_retention_days': {'readonly': True}, - 'max_backup_retention_days': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'min_storage_size': {'key': 'minStorageSize', 'type': 'StorageMBCapability'}, - 'max_storage_size': {'key': 'maxStorageSize', 'type': 'StorageMBCapability'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'long'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StorageEditionCapability, self).__init__(**kwargs) - self.name = None - self.min_storage_size = None - self.max_storage_size = None - self.min_backup_retention_days = None - self.max_backup_retention_days = None - - -class StorageMBCapability(Model): - """storage size in MB capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage MB name - :vartype name: str - :ivar storage_size_mb: storage size in MB - :vartype storage_size_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'storage_size_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'storage_size_mb': {'key': 'storageSizeMB', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StorageMBCapability, self).__init__(**kwargs) - self.name = None - self.storage_size_mb = None - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_iops: Storage IOPS for a server. - :type storage_iops: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_iops': {'key': 'storageIops', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.storage_iops = kwargs.get('storage_iops', None) - self.storage_autogrow = kwargs.get('storage_autogrow', None) - - -class VcoreCapability(Model): - """Vcores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: vCore name - :vartype name: str - :ivar v_cores: supported vCores - :vartype v_cores: long - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar supported_memory_per_vcore_mb: supported memory per vCore in MB - :vartype supported_memory_per_vcore_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'v_cores': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'supported_memory_per_vcore_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'v_cores': {'key': 'vCores', 'type': 'long'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'supported_memory_per_vcore_mb': {'key': 'supportedMemoryPerVcoreMB', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(VcoreCapability, self).__init__(**kwargs) - self.name = None - self.v_cores = None - self.supported_iops = None - self.supported_memory_per_vcore_mb = None - - -class VirtualNetworkSubnetUsageParameter(Model): - """Virtual network subnet usage parameter. - - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - """ - - _attribute_map = { - 'virtual_network_arm_resource_id': {'key': 'virtualNetworkArmResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkSubnetUsageParameter, self).__init__(**kwargs) - self.virtual_network_arm_resource_id = kwargs.get('virtual_network_arm_resource_id', None) - - -class VirtualNetworkSubnetUsageResult(Model): - """Virtual network subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar delegated_subnets_usage: A list of delegated subnet usage - :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetUsage] - """ - - _validation = { - 'delegated_subnets_usage': {'readonly': True}, - } - - _attribute_map = { - 'delegated_subnets_usage': {'key': 'delegatedSubnetsUsage', 'type': '[DelegatedSubnetUsage]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkSubnetUsageResult, self).__init__(**kwargs) - self.delegated_subnets_usage = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models_py3.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models_py3.py deleted file mode 100644 index 99bfb6d7ca1..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_models_py3.py +++ /dev/null @@ -1,1507 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CapabilityProperties(Model): - """Location capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar zone: zone name - :vartype zone: str - :ivar supported_flexible_server_editions: A list of supported flexible - server editions. - :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerEditionCapability] - """ - - _validation = { - 'zone': {'readonly': True}, - 'supported_flexible_server_editions': {'readonly': True}, - } - - _attribute_map = { - 'zone': {'key': 'zone', 'type': 'str'}, - 'supported_flexible_server_editions': {'key': 'supportedFlexibleServerEditions', 'type': '[ServerEditionCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(CapabilityProperties, self).__init__(**kwargs) - self.zone = None - self.supported_flexible_server_editions = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: The resource management error response. - :type error: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - :ivar is_read_only: If is the configuration read only. Possible values - include: 'True', 'False' - :vartype is_read_only: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsReadOnly - :ivar is_config_pending_restart: If is the configuration pending restart - or not. Possible values include: 'True', 'False' - :vartype is_config_pending_restart: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsConfigPendingRestart - :ivar is_dynamic_config: If is the configuration dynamic. Possible values - include: 'True', 'False' - :vartype is_dynamic_config: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsDynamicConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - 'is_read_only': {'readonly': True}, - 'is_config_pending_restart': {'readonly': True}, - 'is_dynamic_config': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'is_read_only': {'key': 'properties.isReadOnly', 'type': 'str'}, - 'is_config_pending_restart': {'key': 'properties.isConfigPendingRestart', 'type': 'str'}, - 'is_dynamic_config': {'key': 'properties.isDynamicConfig', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source - self.is_read_only = None - self.is_config_pending_restart = None - self.is_dynamic_config = None - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation - - -class DelegatedSubnetArguments(Model): - """Delegated subnet arguments of a server. - - :param subnet_arm_resource_id: delegated subnet arm resource id. - :type subnet_arm_resource_id: str - """ - - _attribute_map = { - 'subnet_arm_resource_id': {'key': 'subnetArmResourceId', 'type': 'str'}, - } - - def __init__(self, *, subnet_arm_resource_id: str=None, **kwargs) -> None: - super(DelegatedSubnetArguments, self).__init__(**kwargs) - self.subnet_arm_resource_id = subnet_arm_resource_id - - -class DelegatedSubnetUsage(Model): - """Delegated subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_name: name of the subnet - :vartype subnet_name: str - :ivar usage: Number of used delegated subnets - :vartype usage: long - """ - - _validation = { - 'subnet_name': {'readonly': True}, - 'usage': {'readonly': True}, - } - - _attribute_map = { - 'subnet_name': {'key': 'subnetName', 'type': 'str'}, - 'usage': {'key': 'usage', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(DelegatedSubnetUsage, self).__init__(**kwargs) - self.subnet_name = None - self.usage = None - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class MaintenanceWindow(Model): - """Maintenance window of a server. - - :param custom_window: indicates whether custom window is enabled or - disabled - :type custom_window: str - :param start_hour: start hour for maintenance window - :type start_hour: int - :param start_minute: start minute for maintenance window - :type start_minute: int - :param day_of_week: day of week for maintenance window - :type day_of_week: int - """ - - _attribute_map = { - 'custom_window': {'key': 'customWindow', 'type': 'str'}, - 'start_hour': {'key': 'startHour', 'type': 'int'}, - 'start_minute': {'key': 'startMinute', 'type': 'int'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'int'}, - } - - def __init__(self, *, custom_window: str=None, start_hour: int=None, start_minute: int=None, day_of_week: int=None, **kwargs) -> None: - super(MaintenanceWindow, self).__init__(**kwargs) - self.custom_window = custom_window - self.start_hour = start_hour - self.start_minute = start_minute - self.day_of_week = day_of_week - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - - -class Plan(Model): - """Plan for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code - self.version = version - - -class ResourceModelWithAllowedPropertySet(Model): - """The resource model definition containing the full set of allowed properties - for a resource. Except properties bag, there cannot be a top level property - outside of this set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :param managed_by: The fully qualified resource ID of the resource that - manages this resource. Indicates if this resource is managed by another - azure resource. If this is present, complete mode deployment will not - delete the resource if it is removed from the template since it is managed - by another resource. - :type managed_by: str - :param kind: Metadata used by portal/tooling/etc to render different UX - experiences for resources of the same type; e.g. ApiApps are a kind of - Microsoft.Web/sites type. If supported, the resource provider must - validate and persist this value. - :type kind: str - :ivar etag: The etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal etag - convention. Entity tags are used for comparing two or more entities from - the same requested resource. HTTP/1.1 uses entity tags in the etag - (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - and If-Range (section 14.27) header fields. - :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: - :type identity: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetIdentity - :param sku: - :type sku: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetSku - :param plan: - :type plan: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceModelWithAllowedPropertySetPlan - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, - 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, - 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, - } - - def __init__(self, *, location: str=None, managed_by: str=None, kind: str=None, tags=None, identity=None, sku=None, plan=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.managed_by = managed_by - self.kind = kind - self.etag = None - self.tags = tags - self.identity = identity - self.sku = sku - self.plan = plan - - -class ResourceModelWithAllowedPropertySetIdentity(Identity): - """ResourceModelWithAllowedPropertySetIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(type=type, **kwargs) - - -class ResourceModelWithAllowedPropertySetPlan(Plan): - """ResourceModelWithAllowedPropertySetPlan. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetPlan, self).__init__(name=name, publisher=publisher, product=product, promotion_code=promotion_code, version=version, **kwargs) - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, e.g. Standard_D32s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. - GeneralPurpose. Possible values include: 'Burstable', 'GeneralPurpose', - 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ResourceModelWithAllowedPropertySetSku(Sku): - """ResourceModelWithAllowedPropertySetSku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, e.g. Standard_D32s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. - GeneralPurpose. Possible values include: 'Burstable', 'GeneralPurpose', - 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetSku, self).__init__(name=name, tier=tier, **kwargs) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Identity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param administrator_login_password: The password of the administrator - login (required for server creation). - :type administrator_login_password: str - :param version: Server version. Possible values include: '5.7' - :type version: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.InfrastructureEncryptionEnum - :ivar state: The state of a server. Possible values include: 'Ready', - 'Dropping', 'Disabled', 'Starting', 'Stopping', 'Stopped', 'Updating' - :vartype state: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerState - :ivar ha_state: The state of a HA server. Possible values include: - 'NotEnabled', 'CreatingStandby', 'ReplicatingData', 'FailingOver', - 'Healthy', 'RemovingStandby' - :vartype ha_state: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerHAState - :param ha_enabled: Enable HA or not for a server. Possible values include: - 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum - :ivar fully_qualified_domain_name: The fully qualified domain name of a - server. - :vartype fully_qualified_domain_name: str - :ivar earliest_restore_date: Earliest restore point creation time (ISO8601 - format) - :vartype earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile - :param replication_role: The replication role. - :type replication_role: str - :ivar replica_capacity: The maximum number of replicas that a primary - server can have. - :vartype replica_capacity: int - :ivar public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :vartype public_network_access: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.PublicNetworkAccessEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow - :param source_server_id: The source MySQL server id. - :type source_server_id: str - :param restore_point_in_time: Restore point creation time (ISO8601 - format), specifying the time to restore from. - :type restore_point_in_time: datetime - :param availability_zone: availability Zone information of the server. - :type availability_zone: str - :ivar standby_availability_zone: availability Zone information of the - server. - :vartype standby_availability_zone: str - :ivar byok_enforcement: Status showing whether the data encryption is - enabled with customer-managed keys. - :vartype byok_enforcement: str - :param delegated_subnet_arguments: Delegated subnet arguments. - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments - :param create_mode: The mode to create a new MySQL server. Possible values - include: 'Default', 'PointInTimeRestore', 'Replica' - :type create_mode: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.CreateMode - :param server_tags: Application-specific metadata in the form of key-value - pairs. - :type server_tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'state': {'readonly': True}, - 'ha_state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'replica_capacity': {'readonly': True, 'minimum': 0}, - 'public_network_access': {'readonly': True}, - 'standby_availability_zone': {'readonly': True}, - 'byok_enforcement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'ha_state': {'key': 'properties.haState', 'type': 'str'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'source_server_id': {'key': 'properties.sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, - 'availability_zone': {'key': 'properties.availabilityZone', 'type': 'str'}, - 'standby_availability_zone': {'key': 'properties.standbyAvailabilityZone', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'DelegatedSubnetArguments'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'server_tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, infrastructure_encryption=None, ha_enabled=None, storage_profile=None, replication_role: str=None, maintenance_window=None, source_server_id: str=None, restore_point_in_time=None, availability_zone: str=None, delegated_subnet_arguments=None, create_mode=None, server_tags=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.sku = sku - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.infrastructure_encryption = infrastructure_encryption - self.state = None - self.ha_state = None - self.ha_enabled = ha_enabled - self.fully_qualified_domain_name = None - self.earliest_restore_date = None - self.storage_profile = storage_profile - self.replication_role = replication_role - self.replica_capacity = None - self.public_network_access = None - self.maintenance_window = maintenance_window - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.availability_zone = availability_zone - self.standby_availability_zone = None - self.byok_enforcement = None - self.delegated_subnet_arguments = delegated_subnet_arguments - self.create_mode = create_mode - self.server_tags = server_tags - - -class ServerEditionCapability(Model): - """Server edition capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Server edition name - :vartype name: str - :ivar supported_storage_editions: A list of supported storage editions - :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageEditionCapability] - :ivar supported_server_versions: A list of supported server versions. - :vartype supported_server_versions: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersionCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_editions': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_editions': {'key': 'supportedStorageEditions', 'type': '[StorageEditionCapability]'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_editions = None - self.supported_server_versions = None - - -class ServerForUpdate(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum - :param delegated_subnet_arguments: Delegated subnet arguments. - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments - :param ha_enabled: Enable HA or not for a server. Possible values include: - 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'DelegatedSubnetArguments'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, ssl_enforcement=None, delegated_subnet_arguments=None, ha_enabled=None, maintenance_window=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerForUpdate, self).__init__(**kwargs) - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.ssl_enforcement = ssl_enforcement - self.delegated_subnet_arguments = delegated_subnet_arguments - self.ha_enabled = ha_enabled - self.maintenance_window = maintenance_window - self.replication_role = replication_role - self.tags = tags - - -class ServerKey(ProxyResource): - """A MySQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = uri - self.creation_date = None - - -class ServerVersionCapability(Model): - """Server version capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: server version - :vartype name: str - :ivar supported_vcores: A list of supported Vcores - :vartype supported_vcores: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.VcoreCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_vcores': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_vcores': {'key': 'supportedVcores', 'type': '[VcoreCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_vcores = None - - -class StorageEditionCapability(Model): - """storage edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage edition name - :vartype name: str - :ivar min_storage_size: The minimal supported storage size in MB - :vartype min_storage_size: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability - :ivar max_storage_size: The maximum supported storage size in MB - :vartype max_storage_size: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability - :ivar min_backup_retention_days: Minimal backup retention days - :vartype min_backup_retention_days: long - :ivar max_backup_retention_days: Maximum backup retention days - :vartype max_backup_retention_days: long - """ - - _validation = { - 'name': {'readonly': True}, - 'min_storage_size': {'readonly': True}, - 'max_storage_size': {'readonly': True}, - 'min_backup_retention_days': {'readonly': True}, - 'max_backup_retention_days': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'min_storage_size': {'key': 'minStorageSize', 'type': 'StorageMBCapability'}, - 'max_storage_size': {'key': 'maxStorageSize', 'type': 'StorageMBCapability'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'long'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(StorageEditionCapability, self).__init__(**kwargs) - self.name = None - self.min_storage_size = None - self.max_storage_size = None - self.min_backup_retention_days = None - self.max_backup_retention_days = None - - -class StorageMBCapability(Model): - """storage size in MB capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage MB name - :vartype name: str - :ivar storage_size_mb: storage size in MB - :vartype storage_size_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'storage_size_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'storage_size_mb': {'key': 'storageSizeMB', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(StorageMBCapability, self).__init__(**kwargs) - self.name = None - self.storage_size_mb = None - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_iops: Storage IOPS for a server. - :type storage_iops: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_iops': {'key': 'storageIops', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, *, backup_retention_days: int=None, storage_mb: int=None, storage_iops: int=None, storage_autogrow=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.storage_mb = storage_mb - self.storage_iops = storage_iops - self.storage_autogrow = storage_autogrow - - -class VcoreCapability(Model): - """Vcores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: vCore name - :vartype name: str - :ivar v_cores: supported vCores - :vartype v_cores: long - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar supported_memory_per_vcore_mb: supported memory per vCore in MB - :vartype supported_memory_per_vcore_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'v_cores': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'supported_memory_per_vcore_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'v_cores': {'key': 'vCores', 'type': 'long'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'supported_memory_per_vcore_mb': {'key': 'supportedMemoryPerVcoreMB', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(VcoreCapability, self).__init__(**kwargs) - self.name = None - self.v_cores = None - self.supported_iops = None - self.supported_memory_per_vcore_mb = None - - -class VirtualNetworkSubnetUsageParameter(Model): - """Virtual network subnet usage parameter. - - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - """ - - _attribute_map = { - 'virtual_network_arm_resource_id': {'key': 'virtualNetworkArmResourceId', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_arm_resource_id: str=None, **kwargs) -> None: - super(VirtualNetworkSubnetUsageParameter, self).__init__(**kwargs) - self.virtual_network_arm_resource_id = virtual_network_arm_resource_id - - -class VirtualNetworkSubnetUsageResult(Model): - """Virtual network subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar delegated_subnets_usage: A list of delegated subnet usage - :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetUsage] - """ - - _validation = { - 'delegated_subnets_usage': {'readonly': True}, - } - - _attribute_map = { - 'delegated_subnets_usage': {'key': 'delegatedSubnetsUsage', 'type': '[DelegatedSubnetUsage]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualNetworkSubnetUsageResult, self).__init__(**kwargs) - self.delegated_subnets_usage = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_my_sql_management_client_enums.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_my_sql_management_client_enums.py deleted file mode 100644 index 376e0822ac2..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_my_sql_management_client_enums.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ServerVersion(str, Enum): - - five_full_stop_seven = "5.7" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class InfrastructureEncryptionEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class PublicNetworkAccessEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class HaEnabledEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class StorageAutogrow(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - burstable = "Burstable" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - starting = "Starting" - stopping = "Stopping" - stopped = "Stopped" - updating = "Updating" - - -class ServerHAState(str, Enum): - - not_enabled = "NotEnabled" - creating_standby = "CreatingStandby" - replicating_data = "ReplicatingData" - failing_over = "FailingOver" - healthy = "Healthy" - removing_standby = "RemovingStandby" - - -class CreateMode(str, Enum): - - default = "Default" - point_in_time_restore = "PointInTimeRestore" - replica = "Replica" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class IsReadOnly(str, Enum): - - true = "True" - false = "False" - - -class IsConfigPendingRestart(str, Enum): - - true = "True" - false = "False" - - -class IsDynamicConfig(str, Enum): - - true = "True" - false = "False" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_paged_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_paged_models.py deleted file mode 100644 index a01dc5dfabe..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/models/_paged_models.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) -class ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) -class CapabilityPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`CapabilityProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CapabilityProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(CapabilityPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/__init__.py deleted file mode 100644 index 559a7817d2f..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._servers_operations import ServersOperations -from ._replicas_operations import ReplicasOperations -from ._server_keys_operations import ServerKeysOperations -from ._firewall_rules_operations import FirewallRulesOperations -from ._databases_operations import DatabasesOperations -from ._configurations_operations import ConfigurationsOperations -from ._location_based_capabilities_operations import LocationBasedCapabilitiesOperations -from ._check_virtual_network_subnet_usage_operations import CheckVirtualNetworkSubnetUsageOperations -from ._check_name_availability_operations import CheckNameAvailabilityOperations -from ._operations import Operations - -__all__ = [ - 'ServersOperations', - 'ReplicasOperations', - 'ServerKeysOperations', - 'FirewallRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LocationBasedCapabilitiesOperations', - 'CheckVirtualNetworkSubnetUsageOperations', - 'CheckNameAvailabilityOperations', - 'Operations', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_name_availability_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_name_availability_operations.py deleted file mode 100644 index 411255d3776..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_name_availability_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckNameAvailabilityOperations(object): - """CheckNameAvailabilityOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - def execute( - self, name, type=None, custom_headers=None, raw=False, **operation_config): - """Check the availability of name for server. - - :param name: Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.NameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_availability_request = models.NameAvailabilityRequest(name=name, type=type) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySql/checkNameAvailability'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py deleted file mode 100644 index 17d778fe763..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckVirtualNetworkSubnetUsageOperations(object): - """CheckVirtualNetworkSubnetUsageOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - def execute( - self, location_name, virtual_network_arm_resource_id=None, custom_headers=None, raw=False, **operation_config): - """Get virtual network subnet usage for a given vNet resource id. - - :param location_name: The name of the location. - :type location_name: str - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetworkSubnetUsageResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.VirtualNetworkSubnetUsageResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.VirtualNetworkSubnetUsageParameter(virtual_network_arm_resource_id=virtual_network_arm_resource_id) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualNetworkSubnetUsageParameter') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkSubnetUsageResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySql/locations/{locationName}/checkVirtualNetworkSubnetUsage'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_configurations_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_configurations_operations.py deleted file mode 100644 index 103562abfc6..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ConfigurationsOperations(object): - """ConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - - def _update_initial( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Configuration(value=value, source=source) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Configuration') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a configuration of a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param value: Value of the configuration. - :type value: str - :param source: Source of the configuration. - :type source: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - configuration_name=configuration_name, - value=value, - source=source, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/configurations/{configurationName}'} - - def get( - self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a configuration of server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Configuration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/configurations/{configurationName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the configurations in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Configuration - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ConfigurationPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/configurations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_databases_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_databases_operations.py deleted file mode 100644 index 2a0da646f3b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_databases_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DatabasesOperations(object): - """DatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Database(charset=charset, collation=collation) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Database') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - if response.status_code == 201: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new database or updates an existing database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - charset=charset, - collation=collation, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/databases/{databaseName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Database or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Database or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/databases/{databaseName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the databases in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Database - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.DatabasePaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/databases'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_firewall_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_firewall_rules_operations.py deleted file mode 100644 index 85393787cff..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_firewall_rules_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FirewallRulesOperations(object): - """FirewallRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): - parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'FirewallRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - if response.status_code == 201: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new firewall rule or updates an existing firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the server firewall - rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: The end IP address of the server firewall rule. - Must be IPv4 format. - :type end_ip_address: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - start_ip_address=start_ip_address, - end_ip_address=end_ip_address, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FirewallRule - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRulePaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/firewallRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_location_based_capabilities_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_location_based_capabilities_operations.py deleted file mode 100644 index f9a360a47b0..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_location_based_capabilities_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedCapabilitiesOperations(object): - """LocationBasedCapabilitiesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - def list( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Get capabilities at specified location in a given subscription. - - :param location_name: The name of the location. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CapabilityProperties - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilityPropertiesPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilityProperties] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CapabilityPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySql/locations/{locationName}/capabilities'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_operations.py deleted file mode 100644 index f2331121651..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_operations.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DBForMySql/operations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_replicas_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_replicas_operations.py deleted file mode 100644 index 0e52d193526..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_replicas_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReplicasOperations(object): - """ReplicasOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the replicas for a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/replicas'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_server_keys_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_server_keys_operations.py deleted file mode 100644 index 322b4eb4faf..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_server_keys_operations.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerKeysOperations(object): - """ServerKeysOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, key_name, uri=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerKey(uri=uri) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerKey') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - if response.status_code == 201: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, key_name, uri=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a MySQL Server key. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the server key. - :type key_name: str - :param uri: The URI of the key. - :type uri: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerKey or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - key_name=key_name, - uri=uri, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/keys/{keyName}'} - - - def _delete_initial( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the MySQL Server key with the given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the server key. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - key_name=key_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/keys/{keyName}'} - - def get( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config): - """Gets a server key. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the server key. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/keys/{keyName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Server keys. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServerKey - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKeyPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/keys'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_servers_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_servers_operations.py deleted file mode 100644 index 56561cf848c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/operations/_servers_operations.py +++ /dev/null @@ -1,769 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServersOperations(object): - """ServersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-07-01-privatepreview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-07-01-privatepreview" - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Server') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - if response.status_code == 201: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new server or updates an existing server. The update action - will overwrite the existing server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for creating or updating a - server. - :type parameters: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerForUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing server. The request body can contain one to many of - the properties present in the normal server definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for updating a server. - :type parameters: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerForUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Server or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySql/flexibleServers'} - - - def _restart_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/restart'} - - - def _start_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/start'} - - - def _stop_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySql/flexibleServers/{serverName}/stop'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/version.py deleted file mode 100644 index d0278186f23..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/mysql_flexibleservers/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-07-01-privatepreview" - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/__init__.py deleted file mode 100644 index e48a5a446b8..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import PostgreSQLManagementClientConfiguration -from ._postgre_sql_management_client import PostgreSQLManagementClient -__all__ = ['PostgreSQLManagementClient', 'PostgreSQLManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_configuration.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_configuration.py deleted file mode 100644 index e3158e457fd..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class PostgreSQLManagementClientConfiguration(AzureConfiguration): - """Configuration for PostgreSQLManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(PostgreSQLManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_postgre_sql_management_client.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_postgre_sql_management_client.py deleted file mode 100644 index 106157e977d..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/_postgre_sql_management_client.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import PostgreSQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from . import models - - -class PostgreSQLManagementClient(SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - - :ivar config: Configuration for client. - :vartype config: PostgreSQLManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.postgresql.operations.ServersOperations - :ivar replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.postgresql.operations.ReplicasOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.operations.VirtualNetworkRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.postgresql.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.postgresql.operations.ConfigurationsOperations - :ivar log_files: LogFiles operations - :vartype log_files: azure.mgmt.rdbms.postgresql.operations.LogFilesOperations - :ivar server_administrators: ServerAdministrators operations - :vartype server_administrators: azure.mgmt.rdbms.postgresql.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTier operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.postgresql.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.rdbms.postgresql.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeys operations - :vartype server_keys: azure.mgmt.rdbms.postgresql.operations.ServerKeysOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = PostgreSQLManagementClientConfiguration(credentials, subscription_id, base_url) - super(PostgreSQLManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/__init__.py deleted file mode 100644 index 595a3f8fd2c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AzureEntityResource - from ._models_py3 import Configuration - from ._models_py3 import Database - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import FirewallRule - from ._models_py3 import LogFile - from ._models_py3 import NameAvailability - from ._models_py3 import NameAvailabilityRequest - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import PerformanceTierProperties - from ._models_py3 import PerformanceTierServiceLevelObjectives - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointProperty - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourceProperties - from ._models_py3 import PrivateLinkServiceConnectionStateProperty - from ._models_py3 import ProxyResource - from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity - from ._models_py3 import Server - from ._models_py3 import ServerAdministratorResource - from ._models_py3 import ServerForCreate - from ._models_py3 import ServerKey - from ._models_py3 import ServerPrivateEndpointConnection - from ._models_py3 import ServerPrivateEndpointConnectionProperties - from ._models_py3 import ServerPrivateLinkServiceConnectionStateProperty - from ._models_py3 import ServerPropertiesForCreate - from ._models_py3 import ServerPropertiesForDefaultCreate - from ._models_py3 import ServerPropertiesForGeoRestore - from ._models_py3 import ServerPropertiesForReplica - from ._models_py3 import ServerPropertiesForRestore - from ._models_py3 import ServerSecurityAlertPolicy - from ._models_py3 import ServerUpdateParameters - from ._models_py3 import Sku - from ._models_py3 import StorageProfile - from ._models_py3 import TagsObject - from ._models_py3 import TrackedResource - from ._models_py3 import VirtualNetworkRule -except (SyntaxError, ImportError): - from ._models import AzureEntityResource - from ._models import Configuration - from ._models import Database - from ._models import ErrorAdditionalInfo - from ._models import ErrorResponse - from ._models import FirewallRule - from ._models import LogFile - from ._models import NameAvailability - from ._models import NameAvailabilityRequest - from ._models import Operation - from ._models import OperationDisplay - from ._models import OperationListResult - from ._models import PerformanceTierProperties - from ._models import PerformanceTierServiceLevelObjectives - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointProperty - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourceProperties - from ._models import PrivateLinkServiceConnectionStateProperty - from ._models import ProxyResource - from ._models import Resource - from ._models import ResourceIdentity - from ._models import Server - from ._models import ServerAdministratorResource - from ._models import ServerForCreate - from ._models import ServerKey - from ._models import ServerPrivateEndpointConnection - from ._models import ServerPrivateEndpointConnectionProperties - from ._models import ServerPrivateLinkServiceConnectionStateProperty - from ._models import ServerPropertiesForCreate - from ._models import ServerPropertiesForDefaultCreate - from ._models import ServerPropertiesForGeoRestore - from ._models import ServerPropertiesForReplica - from ._models import ServerPropertiesForRestore - from ._models import ServerSecurityAlertPolicy - from ._models import ServerUpdateParameters - from ._models import Sku - from ._models import StorageProfile - from ._models import TagsObject - from ._models import TrackedResource - from ._models import VirtualNetworkRule -from ._paged_models import ConfigurationPaged -from ._paged_models import DatabasePaged -from ._paged_models import FirewallRulePaged -from ._paged_models import LogFilePaged -from ._paged_models import PerformanceTierPropertiesPaged -from ._paged_models import PrivateEndpointConnectionPaged -from ._paged_models import PrivateLinkResourcePaged -from ._paged_models import ServerAdministratorResourcePaged -from ._paged_models import ServerKeyPaged -from ._paged_models import ServerPaged -from ._paged_models import VirtualNetworkRulePaged -from ._postgre_sql_management_client_enums import ( - ServerVersion, - SslEnforcementEnum, - MinimalTlsVersionEnum, - InfrastructureEncryption, - PublicNetworkAccessEnum, - PrivateLinkServiceConnectionStateStatus, - PrivateLinkServiceConnectionStateActionsRequire, - PrivateEndpointProvisioningState, - ServerState, - GeoRedundantBackup, - StorageAutogrow, - SkuTier, - IdentityType, - VirtualNetworkRuleState, - OperationOrigin, - ServerSecurityAlertPolicyState, -) - -__all__ = [ - 'AzureEntityResource', - 'Configuration', - 'Database', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'FirewallRule', - 'LogFile', - 'NameAvailability', - 'NameAvailabilityRequest', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'PerformanceTierProperties', - 'PerformanceTierServiceLevelObjectives', - 'PrivateEndpointConnection', - 'PrivateEndpointProperty', - 'PrivateLinkResource', - 'PrivateLinkResourceProperties', - 'PrivateLinkServiceConnectionStateProperty', - 'ProxyResource', - 'Resource', - 'ResourceIdentity', - 'Server', - 'ServerAdministratorResource', - 'ServerForCreate', - 'ServerKey', - 'ServerPrivateEndpointConnection', - 'ServerPrivateEndpointConnectionProperties', - 'ServerPrivateLinkServiceConnectionStateProperty', - 'ServerPropertiesForCreate', - 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForGeoRestore', - 'ServerPropertiesForReplica', - 'ServerPropertiesForRestore', - 'ServerSecurityAlertPolicy', - 'ServerUpdateParameters', - 'Sku', - 'StorageProfile', - 'TagsObject', - 'TrackedResource', - 'VirtualNetworkRule', - 'ServerPaged', - 'FirewallRulePaged', - 'VirtualNetworkRulePaged', - 'DatabasePaged', - 'ConfigurationPaged', - 'LogFilePaged', - 'ServerAdministratorResourcePaged', - 'PerformanceTierPropertiesPaged', - 'PrivateEndpointConnectionPaged', - 'PrivateLinkResourcePaged', - 'ServerKeyPaged', - 'ServerVersion', - 'SslEnforcementEnum', - 'MinimalTlsVersionEnum', - 'InfrastructureEncryption', - 'PublicNetworkAccessEnum', - 'PrivateLinkServiceConnectionStateStatus', - 'PrivateLinkServiceConnectionStateActionsRequire', - 'PrivateEndpointProvisioningState', - 'ServerState', - 'GeoRedundantBackup', - 'StorageAutogrow', - 'SkuTier', - 'IdentityType', - 'VirtualNetworkRuleState', - 'OperationOrigin', - 'ServerSecurityAlertPolicyState', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models.py deleted file mode 100644 index 1b4f51807e5..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models.py +++ /dev/null @@ -1,1858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: - :type error: ~azure.mgmt.rdbms.postgresql.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :param url: The url to download the log file from. - :type url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = kwargs.get('url', None) - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.postgresql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.postgresql.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.rdbms.postgresql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :ivar byok_enforcement: Status showing whether the server data encryption - is enabled with customer-managed keys. - :vartype byok_enforcement: str - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' - :type user_visible_state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'byok_enforcement': {'readonly': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.byok_enforcement = None - self.infrastructure_encryption = kwargs.get('infrastructure_encryption', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.master_server_id = kwargs.get('master_server_id', None) - self.replica_capacity = kwargs.get('replica_capacity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.private_endpoint_connections = None - - -class ServerAdministratorResource(ProxyResource): - """Represents a and external administrator to be created. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login account name. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, **kwargs): - super(ServerAdministratorResource, self).__init__(**kwargs) - self.login = kwargs.get('login', None) - self.sid = kwargs.get('sid', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ServerKey(ProxyResource): - """A PostgreSQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, **kwargs): - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = kwargs.get('uri', None) - self.creation_date = None - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID of the Private Endpoint Connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.infrastructure_encryption = kwargs.get('infrastructure_encryption', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForReplica, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '9.5', - '9.6', '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.minimal_tls_version = kwargs.get('minimal_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.postgresql.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'name': {'required': True}, - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.postgresql.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.postgresql.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.storage_autogrow = kwargs.get('storage_autogrow', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models_py3.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models_py3.py deleted file mode 100644 index f573e26d241..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_models_py3.py +++ /dev/null @@ -1,1858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: - :type error: ~azure.mgmt.rdbms.postgresql.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :param url: The url to download the log file from. - :type url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = size_in_kb - self.created_time = None - self.last_modified_time = None - self.log_file_type = log_file_type - self.url = url - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.postgresql.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.postgresql.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - - -class PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives - - -class PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = id - self.edition = edition - self.v_core = v_core - self.hardware_generation = hardware_generation - self.max_backup_retention_days = max_backup_retention_days - self.min_backup_retention_days = min_backup_retention_days - self.max_storage_mb = max_storage_mb - self.min_storage_mb = min_storage_mb - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class PrivateEndpointProperty(Model): - """PrivateEndpointProperty. - - :param id: Resource id of the private endpoint. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpointProperty, self).__init__(**kwargs) - self.id = id - - -class PrivateLinkResource(ProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None - - -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - """ - - _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - } - - def __init__(self, **kwargs) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """PrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - :type status: str - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status: str, description: str, **kwargs) -> None: - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class ResourceIdentity(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'SystemAssigned' - :type type: str or ~azure.mgmt.rdbms.postgresql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.type = type - self.tenant_id = None - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :ivar byok_enforcement: Status showing whether the server data encryption - is enabled with customer-managed keys. - :vartype byok_enforcement: str - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' - :type user_visible_state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :ivar private_endpoint_connections: List of private endpoint connections - on a server - :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'byok_enforcement': {'readonly': True}, - 'replica_capacity': {'minimum': 0}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'properties.infrastructureEncryption', 'type': 'str'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, public_network_access=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.sku = sku - self.administrator_login = administrator_login - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.byok_enforcement = None - self.infrastructure_encryption = infrastructure_encryption - self.user_visible_state = user_visible_state - self.fully_qualified_domain_name = fully_qualified_domain_name - self.earliest_restore_date = earliest_restore_date - self.storage_profile = storage_profile - self.replication_role = replication_role - self.master_server_id = master_server_id - self.replica_capacity = replica_capacity - self.public_network_access = public_network_access - self.private_endpoint_connections = None - - -class ServerAdministratorResource(ProxyResource): - """Represents a and external administrator to be created. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar administrator_type: Required. The type of administrator. Default - value: "ActiveDirectory" . - :vartype administrator_type: str - :param login: Required. The server administrator login account name. - :type login: str - :param sid: Required. The server administrator Sid (Secure ID). - :type sid: str - :param tenant_id: Required. The server Active Directory Administrator - tenant id. - :type tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'administrator_type': {'required': True, 'constant': True}, - 'login': {'required': True}, - 'sid': {'required': True}, - 'tenant_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, - 'login': {'key': 'properties.login', 'type': 'str'}, - 'sid': {'key': 'properties.sid', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - } - - administrator_type = "ActiveDirectory" - - def __init__(self, *, login: str, sid: str, tenant_id: str, **kwargs) -> None: - super(ServerAdministratorResource, self).__init__(**kwargs) - self.login = login - self.sid = sid - self.tenant_id = tenant_id - - -class ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, properties, location: str, identity=None, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.identity = identity - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags - - -class ServerKey(ProxyResource): - """A PostgreSQL Server key. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar kind: Kind of encryption protector used to protect the key. - :vartype kind: str - :ivar server_key_type: Required. The key type like 'AzureKeyVault'. - Default value: "AzureKeyVault" . - :vartype server_key_type: str - :param uri: The URI of the key. - :type uri: str - :ivar creation_date: The key creation date. - :vartype creation_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'readonly': True}, - 'server_key_type': {'required': True, 'constant': True}, - 'creation_date': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, - } - - server_key_type = "AzureKeyVault" - - def __init__(self, *, uri: str=None, **kwargs) -> None: - super(ServerKey, self).__init__(**kwargs) - self.kind = None - self.uri = uri - self.creation_date = None - - -class ServerPrivateEndpointConnection(Model): - """A private endpoint connection under a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID of the Private Endpoint Connection. - :vartype id: str - :ivar properties: Private endpoint connection properties - :vartype properties: - ~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerPrivateEndpointConnectionProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerPrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.properties = None - - -class ServerPrivateEndpointConnectionProperties(Model): - """Properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.models.ServerPrivateLinkServiceConnectionStateProperty - :ivar provisioning_state: State of the private endpoint connection. - Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', - 'Rejecting' - :vartype provisioning_state: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProvisioningState - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ServerPrivateLinkServiceConnectionStateProperty'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(ServerPrivateEndpointConnectionProperties, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - - -class ServerPrivateLinkServiceConnectionStateProperty(Model): - """ServerPrivateLinkServiceConnectionStateProperty. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. The private link service connection status. - Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateStatus - :param description: Required. The private link service connection - description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. Possible values include: 'None' - :vartype actions_required: str or - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateActionsRequire - """ - - _validation = { - 'status': {'required': True}, - 'description': {'required': True}, - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, *, status, description: str, **kwargs) -> None: - super(ServerPrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, *, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.infrastructure_encryption = infrastructure_encryption - self.public_network_access = public_network_access - self.storage_profile = storage_profile - self.create_mode = None - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, *, administrator_login: str, administrator_login_password: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'Replica' - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '9.5', '9.6', - '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param infrastructure_encryption: Status showing whether the server - enabled infrastructure encryption. Possible values include: 'Enabled', - 'Disabled' - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'minimalTlsVersion', 'type': 'str'}, - 'infrastructure_encryption': {'key': 'infrastructureEncryption', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_server_id: str, restore_point_in_time, version=None, ssl_enforcement=None, minimal_tls_version=None, infrastructure_encryption=None, public_network_access=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, minimal_tls_version=minimal_tls_version, infrastructure_encryption=infrastructure_encryption, public_network_access=public_network_access, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days - - -class ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '9.5', - '9.6', '10', '10.0', '10.2', '11' - :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum - :param minimal_tls_version: Enforce a minimal Tls version for the server. - Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', - 'TLSEnforcementDisabled' - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum - :param public_network_access: Whether or not public network access is - allowed for this server. Value is optional but if passed in, must be - 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, identity=None, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, minimal_tls_version=None, public_network_access=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - self.identity = identity - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.minimal_tls_version = minimal_tls_version - self.public_network_access = public_network_access - self.replication_role = replication_role - self.tags = tags - - -class Sku(Model): - """Billing information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.postgresql.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'name': {'required': True}, - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.postgresql.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.postgresql.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None, storage_mb: int=None, storage_autogrow=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb - self.storage_autogrow = storage_autogrow - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_paged_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_paged_models.py deleted file mode 100644 index eb66a2bb478..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_paged_models.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) -class VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) -class DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) -class ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) -class LogFilePaged(Paged): - """ - A paging container for iterating over a list of :class:`LogFile ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LogFile]'} - } - - def __init__(self, *args, **kwargs): - - super(LogFilePaged, self).__init__(*args, **kwargs) -class ServerAdministratorResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerAdministratorResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerAdministratorResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerAdministratorResourcePaged, self).__init__(*args, **kwargs) -class PerformanceTierPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`PerformanceTierProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) -class PrivateEndpointConnectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) -class PrivateLinkResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`PrivateLinkResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} - } - - def __init__(self, *args, **kwargs): - - super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) -class ServerKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServerKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServerKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerKeyPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_postgre_sql_management_client_enums.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_postgre_sql_management_client_enums.py deleted file mode 100644 index 391259dd48f..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/models/_postgre_sql_management_client_enums.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ServerVersion(str, Enum): - - nine_full_stop_five = "9.5" - nine_full_stop_six = "9.6" - one_zero = "10" - one_zero_full_stop_zero = "10.0" - one_zero_full_stop_two = "10.2" - one_one = "11" - - -class SslEnforcementEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class MinimalTlsVersionEnum(str, Enum): - - tls1_0 = "TLS1_0" - tls1_1 = "TLS1_1" - tls1_2 = "TLS1_2" - tls_enforcement_disabled = "TLSEnforcementDisabled" - - -class InfrastructureEncryption(str, Enum): - - enabled = "Enabled" #: Default value for single layer of encryption for data at rest. - disabled = "Disabled" #: Additional (2nd) layer of encryption for data at rest - - -class PublicNetworkAccessEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class PrivateLinkServiceConnectionStateStatus(str, Enum): - - approved = "Approved" - pending = "Pending" - rejected = "Rejected" - disconnected = "Disconnected" - - -class PrivateLinkServiceConnectionStateActionsRequire(str, Enum): - - none = "None" - - -class PrivateEndpointProvisioningState(str, Enum): - - approving = "Approving" - ready = "Ready" - dropping = "Dropping" - failed = "Failed" - rejecting = "Rejecting" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - inaccessible = "Inaccessible" - - -class GeoRedundantBackup(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class StorageAutogrow(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class SkuTier(str, Enum): - - basic = "Basic" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class IdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class VirtualNetworkRuleState(str, Enum): - - initializing = "Initializing" - in_progress = "InProgress" - ready = "Ready" - deleting = "Deleting" - unknown = "Unknown" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" - - -class ServerSecurityAlertPolicyState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/__init__.py deleted file mode 100644 index 63a6fb68cbd..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._servers_operations import ServersOperations -from ._replicas_operations import ReplicasOperations -from ._firewall_rules_operations import FirewallRulesOperations -from ._virtual_network_rules_operations import VirtualNetworkRulesOperations -from ._databases_operations import DatabasesOperations -from ._configurations_operations import ConfigurationsOperations -from ._log_files_operations import LogFilesOperations -from ._server_administrators_operations import ServerAdministratorsOperations -from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations -from ._check_name_availability_operations import CheckNameAvailabilityOperations -from ._operations import Operations -from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._server_keys_operations import ServerKeysOperations - -__all__ = [ - 'ServersOperations', - 'ReplicasOperations', - 'FirewallRulesOperations', - 'VirtualNetworkRulesOperations', - 'DatabasesOperations', - 'ConfigurationsOperations', - 'LogFilesOperations', - 'ServerAdministratorsOperations', - 'LocationBasedPerformanceTierOperations', - 'CheckNameAvailabilityOperations', - 'Operations', - 'ServerSecurityAlertPoliciesOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ServerKeysOperations', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_check_name_availability_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_check_name_availability_operations.py deleted file mode 100644 index b5f989f4c12..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_check_name_availability_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckNameAvailabilityOperations(object): - """CheckNameAvailabilityOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def execute( - self, name, type=None, custom_headers=None, raw=False, **operation_config): - """Check the availability of name for resource. - - :param name: Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.NameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_availability_request = models.NameAvailabilityRequest(name=name, type=type) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/checkNameAvailability'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_configurations_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_configurations_operations.py deleted file mode 100644 index c601cace93b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_configurations_operations.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ConfigurationsOperations(object): - """ConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Configuration(value=value, source=source) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Configuration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a configuration of a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param value: Value of the configuration. - :type value: str - :param source: Source of the configuration. - :type source: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Configuration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - configuration_name=configuration_name, - value=value, - source=source, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}'} - - def get( - self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a configuration of server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Configuration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.Configuration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the configurations in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Configuration - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ConfigurationPaged[~azure.mgmt.rdbms.postgresql.models.Configuration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_databases_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_databases_operations.py deleted file mode 100644 index e1320c30009..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_databases_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DatabasesOperations(object): - """DatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Database(charset=charset, collation=collation) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Database') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - if response.status_code == 201: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new database or updates an existing database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Database or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Database] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Database]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - charset=charset, - collation=collation, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}'} - - - def _delete_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}'} - - def get( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a database. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param database_name: The name of the database. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Database or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.Database or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Database', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the databases in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Database - :rtype: - ~azure.mgmt.rdbms.postgresql.models.DatabasePaged[~azure.mgmt.rdbms.postgresql.models.Database] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_firewall_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_firewall_rules_operations.py deleted file mode 100644 index 37deb29884b..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_firewall_rules_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FirewallRulesOperations(object): - """FirewallRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): - parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'FirewallRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - if response.status_code == 201: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new firewall rule or updates an existing firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the server firewall - rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: The end IP address of the server firewall rule. - Must be IPv4 format. - :type end_ip_address: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.FirewallRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - start_ip_address=start_ip_address, - end_ip_address=end_ip_address, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FirewallRule - :rtype: - ~azure.mgmt.rdbms.postgresql.models.FirewallRulePaged[~azure.mgmt.rdbms.postgresql.models.FirewallRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_location_based_performance_tier_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_location_based_performance_tier_operations.py deleted file mode 100644 index 1986858faed..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_location_based_performance_tier_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedPerformanceTierOperations(object): - """LocationBasedPerformanceTierOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, location_name, custom_headers=None, raw=False, **operation_config): - """List all the performance tiers at specified location in a given - subscription. - - :param location_name: The name of the location. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerformanceTierProperties - :rtype: - ~azure.mgmt.rdbms.postgresql.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierProperties] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/locations/{locationName}/performanceTiers'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_log_files_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_log_files_operations.py deleted file mode 100644 index a69bd01a608..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_log_files_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LogFilesOperations(object): - """LogFilesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the log files in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LogFile - :rtype: - ~azure.mgmt.rdbms.postgresql.models.LogFilePaged[~azure.mgmt.rdbms.postgresql.models.LogFile] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/logFiles'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_operations.py deleted file mode 100644 index fe34d87c2f1..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_operations.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DBForPostgreSQL/operations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_endpoint_connections_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index e52b0bfd70a..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,490 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param private_endpoint: Private endpoint which the connection belongs - to. - :type private_endpoint: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateProperty - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint=private_endpoint, - private_link_service_connection_state=private_link_service_connection_state, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _update_tags_initial( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on private endpoint connection. - - Updates private endpoint connection with the specified tags. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param private_endpoint_connection_name: - :type private_endpoint_connection_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateEndpointConnection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - server_name=server_name, - private_endpoint_connection_name=private_endpoint_connection_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets all private endpoint connections on a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateEndpointConnection - :rtype: - ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnectionPaged[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_link_resources_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_link_resources_operations.py deleted file mode 100644 index 99352acfa20..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets the private link resources for PostgreSQL server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PrivateLinkResource - :rtype: - ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourcePaged[~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateLinkResources'} - - def get( - self, resource_group_name, server_name, group_name, custom_headers=None, raw=False, **operation_config): - """Gets a private link resource for PostgreSQL server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param group_name: The name of the private link resource. - :type group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'groupName': self._serialize.url("group_name", group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateLinkResources/{groupName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_replicas_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_replicas_operations.py deleted file mode 100644 index 3cbff34a303..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_replicas_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReplicasOperations(object): - """ReplicasOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the replicas for a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerPaged[~azure.mgmt.rdbms.postgresql.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/Replicas'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_administrators_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_administrators_operations.py deleted file mode 100644 index 1818f668ff4..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_administrators_operations.py +++ /dev/null @@ -1,365 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerAdministratorsOperations(object): - """ServerAdministratorsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a AAD server administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerAdministratorResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/Administrators/activeDirectory'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, properties, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(properties, 'ServerAdministratorResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerAdministratorResource', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or update active directory administrator on an existing server. - The update action will overwrite the existing administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param properties: The required parameters for creating or updating an - AAD server administrator. - :type properties: - ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerAdministratorResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - properties=properties, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerAdministratorResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/Administrators/activeDirectory'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes server active directory administrator. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/Administrators/activeDirectory'} - - def list( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Returns a list of server Administrators. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServerAdministratorResource - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResourcePaged[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerAdministratorResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/administrators'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_keys_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_keys_operations.py deleted file mode 100644 index f94a3bf1cd3..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_keys_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerKeysOperations(object): - """ServerKeysOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Server keys. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServerKey - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerKeyPaged[~azure.mgmt.rdbms.postgresql.models.ServerKey] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys'} - - def get( - self, resource_group_name, server_name, key_name, custom_headers=None, raw=False, **operation_config): - """Gets a PostgreSQL Server key. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the PostgreSQL Server key to be - retrieved. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerKey or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}'} - - - def _create_or_update_initial( - self, server_name, key_name, resource_group_name, uri=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ServerKey(uri=uri) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerKey') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerKey', response) - if response.status_code == 202: - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, server_name, key_name, resource_group_name, uri=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a PostgreSQL Server key. - - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the PostgreSQL Server key to be operated - on (updated or created). - :type key_name: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param uri: The URI of the key. - :type uri: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ServerKey or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerKey] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerKey]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - server_name=server_name, - key_name=key_name, - resource_group_name=resource_group_name, - uri=uri, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}'} - - - def _delete_initial( - self, server_name, key_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, server_name, key_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the PostgreSQL Server key with the given name. - - :param server_name: The name of the server. - :type server_name: str - :param key_name: The name of the PostgreSQL Server key to be deleted. - :type key_name: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - server_name=server_name, - key_name=key_name, - resource_group_name=resource_group_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_security_alert_policies_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_security_alert_policies_operations.py deleted file mode 100644 index d87af7b07f8..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_server_security_alert_policies_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServerSecurityAlertPoliciesOperations(object): - """ServerSecurityAlertPoliciesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.security_alert_policy_name = "Default" - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Get a server's security alert policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a threat detection policy. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The server security alert policy. - :type parameters: - ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ServerSecurityAlertPolicy or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ServerSecurityAlertPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_servers_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_servers_operations.py deleted file mode 100644 index 4132b208371..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_servers_operations.py +++ /dev/null @@ -1,607 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServersOperations(object): - """ServersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerForCreate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - if response.status_code == 201: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new server, or will overwrite an existing server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for creating or updating a - server. - :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerForCreate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing server. The request body can contain one to many of - the properties present in the normal server definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for updating a server. - :type parameters: - ~azure.mgmt.rdbms.postgresql.models.ServerUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Server or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerPaged[~azure.mgmt.rdbms.postgresql.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.postgresql.models.ServerPaged[~azure.mgmt.rdbms.postgresql.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/servers'} - - - def _restart_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/restart'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_virtual_network_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_virtual_network_rules_operations.py deleted file mode 100644 index cfe3af703e9..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/operations/_virtual_network_rules_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class VirtualNetworkRulesOperations(object): - """VirtualNetworkRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2017-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-12-01" - - self.config = config - - def get( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets a virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetworkRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _create_or_update_initial( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, **operation_config): - parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualNetworkRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkRule', response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an existing virtual network rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param virtual_network_subnet_id: The ARM resource id of the virtual - network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule - before the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualNetworkRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - virtual_network_subnet_id=virtual_network_subnet_id, - ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VirtualNetworkRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the virtual network rule with the given name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param virtual_network_rule_name: The name of the virtual network - rule. - :type virtual_network_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - virtual_network_rule_name=virtual_network_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of virtual network rules in a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VirtualNetworkRule - :rtype: - ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/version.py deleted file mode 100644 index e5978466adb..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2017-12-01" - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/__init__.py deleted file mode 100644 index e48a5a446b8..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import PostgreSQLManagementClientConfiguration -from ._postgre_sql_management_client import PostgreSQLManagementClient -__all__ = ['PostgreSQLManagementClient', 'PostgreSQLManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_configuration.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_configuration.py deleted file mode 100644 index e3158e457fd..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class PostgreSQLManagementClientConfiguration(AzureConfiguration): - """Configuration for PostgreSQLManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(PostgreSQLManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_postgre_sql_management_client.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_postgre_sql_management_client.py deleted file mode 100644 index 2e9593ef914..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/_postgre_sql_management_client.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import PostgreSQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import FirewallRulesOperations -from .operations import ConfigurationsOperations -from .operations import CheckNameAvailabilityOperations -from .operations import LocationBasedCapabilitiesOperations -from .operations import VirtualNetworkSubnetUsageOperations -from .operations import Operations -from . import models - - -class PostgreSQLManagementClient(SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - - :ivar config: Configuration for client. - :vartype config: PostgreSQLManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.postgresql_flexibleservers.operations.ServersOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql_flexibleservers.operations.FirewallRulesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.postgresql_flexibleservers.operations.ConfigurationsOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql_flexibleservers.operations.CheckNameAvailabilityOperations - :ivar location_based_capabilities: LocationBasedCapabilities operations - :vartype location_based_capabilities: azure.mgmt.rdbms.postgresql_flexibleservers.operations.LocationBasedCapabilitiesOperations - :ivar virtual_network_subnet_usage: VirtualNetworkSubnetUsage operations - :vartype virtual_network_subnet_usage: azure.mgmt.rdbms.postgresql_flexibleservers.operations.VirtualNetworkSubnetUsageOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql_flexibleservers.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = PostgreSQLManagementClientConfiguration(credentials, subscription_id, base_url) - super(PostgreSQLManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-02-14-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_capabilities = LocationBasedCapabilitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_subnet_usage = VirtualNetworkSubnetUsageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/__init__.py deleted file mode 100644 index 0966e367434..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AzureEntityResource - from ._models_py3 import CapabilityProperties - from ._models_py3 import Configuration - from ._models_py3 import DelegatedSubnetUsage - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import FirewallRule - from ._models_py3 import Identity - from ._models_py3 import MaintenanceWindow - from ._models_py3 import NameAvailability - from ._models_py3 import NameAvailabilityRequest - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import Plan - from ._models_py3 import ProxyResource - from ._models_py3 import Resource - from ._models_py3 import ResourceModelWithAllowedPropertySet - from ._models_py3 import ResourceModelWithAllowedPropertySetIdentity - from ._models_py3 import ResourceModelWithAllowedPropertySetPlan - from ._models_py3 import ResourceModelWithAllowedPropertySetSku - from ._models_py3 import Server - from ._models_py3 import ServerEditionCapability - from ._models_py3 import ServerForUpdate - from ._models_py3 import ServerPropertiesDelegatedSubnetArguments - from ._models_py3 import ServerVersionCapability - from ._models_py3 import Sku - from ._models_py3 import StorageEditionCapability - from ._models_py3 import StorageMBCapability - from ._models_py3 import StorageProfile - from ._models_py3 import TrackedResource - from ._models_py3 import VcoreCapability - from ._models_py3 import VirtualNetworkSubnetUsageParameter - from ._models_py3 import VirtualNetworkSubnetUsageResult -except (SyntaxError, ImportError): - from ._models import AzureEntityResource - from ._models import CapabilityProperties - from ._models import Configuration - from ._models import DelegatedSubnetUsage - from ._models import ErrorAdditionalInfo - from ._models import ErrorResponse - from ._models import FirewallRule - from ._models import Identity - from ._models import MaintenanceWindow - from ._models import NameAvailability - from ._models import NameAvailabilityRequest - from ._models import Operation - from ._models import OperationDisplay - from ._models import OperationListResult - from ._models import Plan - from ._models import ProxyResource - from ._models import Resource - from ._models import ResourceModelWithAllowedPropertySet - from ._models import ResourceModelWithAllowedPropertySetIdentity - from ._models import ResourceModelWithAllowedPropertySetPlan - from ._models import ResourceModelWithAllowedPropertySetSku - from ._models import Server - from ._models import ServerEditionCapability - from ._models import ServerForUpdate - from ._models import ServerPropertiesDelegatedSubnetArguments - from ._models import ServerVersionCapability - from ._models import Sku - from ._models import StorageEditionCapability - from ._models import StorageMBCapability - from ._models import StorageProfile - from ._models import TrackedResource - from ._models import VcoreCapability - from ._models import VirtualNetworkSubnetUsageParameter - from ._models import VirtualNetworkSubnetUsageResult -from ._paged_models import CapabilityPropertiesPaged -from ._paged_models import ConfigurationPaged -from ._paged_models import FirewallRulePaged -from ._paged_models import ServerPaged -from ._postgre_sql_management_client_enums import ( - ServerVersion, - ServerState, - ServerHAState, - ServerPublicNetworkAccessState, - HAEnabledEnum, - CreateMode, - ResourceIdentityType, - SkuTier, - ConfigurationDataType, - OperationOrigin, -) - -__all__ = [ - 'AzureEntityResource', - 'CapabilityProperties', - 'Configuration', - 'DelegatedSubnetUsage', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'FirewallRule', - 'Identity', - 'MaintenanceWindow', - 'NameAvailability', - 'NameAvailabilityRequest', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'Plan', - 'ProxyResource', - 'Resource', - 'ResourceModelWithAllowedPropertySet', - 'ResourceModelWithAllowedPropertySetIdentity', - 'ResourceModelWithAllowedPropertySetPlan', - 'ResourceModelWithAllowedPropertySetSku', - 'Server', - 'ServerEditionCapability', - 'ServerForUpdate', - 'ServerPropertiesDelegatedSubnetArguments', - 'ServerVersionCapability', - 'Sku', - 'StorageEditionCapability', - 'StorageMBCapability', - 'StorageProfile', - 'TrackedResource', - 'VcoreCapability', - 'VirtualNetworkSubnetUsageParameter', - 'VirtualNetworkSubnetUsageResult', - 'ServerPaged', - 'FirewallRulePaged', - 'ConfigurationPaged', - 'CapabilityPropertiesPaged', - 'ServerVersion', - 'ServerState', - 'ServerHAState', - 'ServerPublicNetworkAccessState', - 'HAEnabledEnum', - 'CreateMode', - 'ResourceIdentityType', - 'SkuTier', - 'ConfigurationDataType', - 'OperationOrigin', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models.py deleted file mode 100644 index dad7f4c3331..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models.py +++ /dev/null @@ -1,1355 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CapabilityProperties(Model): - """Location capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar zone: zone name - :vartype zone: str - :ivar supported_flexible_server_editions: - :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerEditionCapability] - """ - - _validation = { - 'zone': {'readonly': True}, - 'supported_flexible_server_editions': {'readonly': True}, - } - - _attribute_map = { - 'zone': {'key': 'zone', 'type': 'str'}, - 'supported_flexible_server_editions': {'key': 'supportedFlexibleServerEditions', 'type': '[ServerEditionCapability]'}, - } - - def __init__(self, **kwargs): - super(CapabilityProperties, self).__init__(**kwargs) - self.zone = None - self.supported_flexible_server_editions = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: - :type error: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. Possible values include: - 'Boolean', 'Numeric', 'Integer', 'Enumeration' - :vartype data_type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationDataType - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) - - -class DelegatedSubnetUsage(Model): - """Delegated subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_name: name of the subnet - :vartype subnet_name: str - :ivar usage: Number of used delegated subnets - :vartype usage: long - """ - - _validation = { - 'subnet_name': {'readonly': True}, - 'usage': {'readonly': True}, - } - - _attribute_map = { - 'subnet_name': {'key': 'subnetName', 'type': 'str'}, - 'usage': {'key': 'usage', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(DelegatedSubnetUsage, self).__init__(**kwargs) - self.subnet_name = None - self.usage = None - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class MaintenanceWindow(Model): - """Maintenance window of a server. - - :param custom_window: indicates whether custom window is enabled or - disabled - :type custom_window: str - :param start_hour: start hour for maintenance window - :type start_hour: int - :param start_minute: start minute for maintenance window - :type start_minute: int - :param day_of_week: day of week for maintenance window - :type day_of_week: int - """ - - _attribute_map = { - 'custom_window': {'key': 'customWindow', 'type': 'str'}, - 'start_hour': {'key': 'startHour', 'type': 'int'}, - 'start_minute': {'key': 'startMinute', 'type': 'int'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(MaintenanceWindow, self).__init__(**kwargs) - self.custom_window = kwargs.get('custom_window', None) - self.start_hour = kwargs.get('start_hour', None) - self.start_minute = kwargs.get('start_minute', None) - self.day_of_week = kwargs.get('day_of_week', None) - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param name: name of the PostgreSQL server. - :type name: str - :param type: type of the server - :type type: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationDisplay - :param is_data_action: Indicates whether the operation is a data action - :type is_data_action: bool - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.is_data_action = kwargs.get('is_data_action', None) - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: Collection of available operation details - :type value: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Operation] - :param next_link: URL client should use to fetch the next page (per server - side paging). - It's null for now, added for future use. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Plan(Model): - """Plan for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) - self.version = kwargs.get('version', None) - - -class ResourceModelWithAllowedPropertySet(Model): - """The resource model definition containing the full set of allowed properties - for a resource. Except properties bag, there cannot be a top level property - outside of this set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :param managed_by: The fully qualified resource ID of the resource that - manages this resource. Indicates if this resource is managed by another - azure resource. If this is present, complete mode deployment will not - delete the resource if it is removed from the template since it is managed - by another resource. - :type managed_by: str - :param kind: Metadata used by portal/tooling/etc to render different UX - experiences for resources of the same type; e.g. ApiApps are a kind of - Microsoft.Web/sites type. If supported, the resource provider must - validate and persist this value. - :type kind: str - :ivar etag: The etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal etag - convention. Entity tags are used for comparing two or more entities from - the same requested resource. HTTP/1.1 uses entity tags in the etag - (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - and If-Range (section 14.27) header fields. - :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: - :type identity: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetIdentity - :param sku: - :type sku: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetSku - :param plan: - :type plan: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetPlan - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, - 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, - 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.managed_by = kwargs.get('managed_by', None) - self.kind = kwargs.get('kind', None) - self.etag = None - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.plan = kwargs.get('plan', None) - - -class ResourceModelWithAllowedPropertySetIdentity(Identity): - """ResourceModelWithAllowedPropertySetIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(**kwargs) - - -class ResourceModelWithAllowedPropertySetPlan(Plan): - """ResourceModelWithAllowedPropertySetPlan. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetPlan, self).__init__(**kwargs) - - -class Sku(Model): - """Sku information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. Standard_D4s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. Burstable. - Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ResourceModelWithAllowedPropertySetSku(Sku): - """ResourceModelWithAllowedPropertySetSku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. Standard_D4s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. Burstable. - Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceModelWithAllowedPropertySetSku, self).__init__(**kwargs) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Identity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: PostgreSQL Server version. Possible values include: '12', - '11' - :type version: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersion - :ivar state: A state of a server that is visible to user. Possible values - include: 'Ready', 'Dropping', 'Disabled', 'Starting', 'Stopping', - 'Stopped', 'Updating' - :vartype state: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerState - :ivar ha_state: A state of a HA server that is visible to user. Possible - values include: 'NotEnabled', 'CreatingStandby', 'ReplicatingData', - 'FailingOver', 'Healthy', 'RemovingStandby' - :vartype ha_state: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerHAState - :ivar fully_qualified_domain_name: The fully qualified domain name of a - server. - :vartype fully_qualified_domain_name: str - :param display_name: The display name of a server. - :type display_name: str - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile - :ivar public_network_access: public network access is enabled or not. - Possible values include: 'Enabled', 'Disabled' - :vartype public_network_access: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPublicNetworkAccessState - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow - :param ha_enabled: stand by count value can be either enabled or disabled. - Possible values include: 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum - :param source_server_name: The source PostgreSQL server name to restore - from. - :type source_server_name: str - :param point_in_time_utc: Restore point creation time (ISO8601 format), - specifying the time to restore from. - :type point_in_time_utc: datetime - :param availability_zone: availability Zone information of the server. - :type availability_zone: str - :ivar standby_availability_zone: availability Zone information of the - server. - :vartype standby_availability_zone: str - :ivar byok_enforcement: Status showing whether the data encryption is - enabled with customer-managed keys. - :vartype byok_enforcement: str - :param delegated_subnet_arguments: - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPropertiesDelegatedSubnetArguments - :param create_mode: The mode to create a new PostgreSQL server. Possible - values include: 'Default', 'PointInTimeRestore' - :type create_mode: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.CreateMode - :param server_tags: Application-specific metadata in the form of key-value - pairs. - :type server_tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'state': {'readonly': True}, - 'ha_state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'public_network_access': {'readonly': True}, - 'standby_availability_zone': {'readonly': True}, - 'byok_enforcement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'ha_state': {'key': 'properties.haState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'HAEnabledEnum'}, - 'source_server_name': {'key': 'properties.sourceServerName', 'type': 'str'}, - 'point_in_time_utc': {'key': 'properties.pointInTimeUTC', 'type': 'iso-8601'}, - 'availability_zone': {'key': 'properties.availabilityZone', 'type': 'str'}, - 'standby_availability_zone': {'key': 'properties.standbyAvailabilityZone', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'ServerPropertiesDelegatedSubnetArguments'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'server_tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.state = None - self.ha_state = None - self.fully_qualified_domain_name = None - self.display_name = kwargs.get('display_name', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.public_network_access = None - self.maintenance_window = kwargs.get('maintenance_window', None) - self.ha_enabled = kwargs.get('ha_enabled', None) - self.source_server_name = kwargs.get('source_server_name', None) - self.point_in_time_utc = kwargs.get('point_in_time_utc', None) - self.availability_zone = kwargs.get('availability_zone', None) - self.standby_availability_zone = None - self.byok_enforcement = None - self.delegated_subnet_arguments = kwargs.get('delegated_subnet_arguments', None) - self.create_mode = kwargs.get('create_mode', None) - self.server_tags = kwargs.get('server_tags', None) - - -class ServerEditionCapability(Model): - """Server edition capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Server edition name - :vartype name: str - :ivar supported_storage_editions: - :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageEditionCapability] - :ivar supported_server_versions: - :vartype supported_server_versions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersionCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_editions': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_editions': {'key': 'supportedStorageEditions', 'type': '[StorageEditionCapability]'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - } - - def __init__(self, **kwargs): - super(ServerEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_editions = None - self.supported_server_versions = None - - -class ServerForUpdate(Model): - """Represents a server to be updated. - - :param location: The location the resource resides in. - :type location: str - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile - :param ha_enabled: stand by count value can be either enabled or disabled. - Possible values include: 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'HAEnabledEnum'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForUpdate, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.ha_enabled = kwargs.get('ha_enabled', None) - self.maintenance_window = kwargs.get('maintenance_window', None) - self.tags = kwargs.get('tags', None) - - -class ServerPropertiesDelegatedSubnetArguments(Model): - """ServerPropertiesDelegatedSubnetArguments. - - :param subnet_arm_resource_id: delegated subnet arm resource id. - :type subnet_arm_resource_id: str - """ - - _attribute_map = { - 'subnet_arm_resource_id': {'key': 'subnetArmResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesDelegatedSubnetArguments, self).__init__(**kwargs) - self.subnet_arm_resource_id = kwargs.get('subnet_arm_resource_id', None) - - -class ServerVersionCapability(Model): - """Server version capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: server version - :vartype name: str - :ivar supported_vcores: - :vartype supported_vcores: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.VcoreCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_vcores': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_vcores': {'key': 'supportedVcores', 'type': '[VcoreCapability]'}, - } - - def __init__(self, **kwargs): - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_vcores = None - - -class StorageEditionCapability(Model): - """storage edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage edition name - :vartype name: str - :ivar supported_storage_mb: - :vartype supported_storage_mb: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageMBCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_mb': {'key': 'supportedStorageMB', 'type': '[StorageMBCapability]'}, - } - - def __init__(self, **kwargs): - super(StorageEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_mb = None - - -class StorageMBCapability(Model): - """storage size in MB capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage MB name - :vartype name: str - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar storage_size_mb: storage size in MB - :vartype storage_size_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'storage_size_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'storage_size_mb': {'key': 'storageSizeMB', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StorageMBCapability, self).__init__(**kwargs) - self.name = None - self.supported_iops = None - self.storage_size_mb = None - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.storage_mb = kwargs.get('storage_mb', None) - - -class VcoreCapability(Model): - """Vcores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: vCore name - :vartype name: str - :ivar v_cores: supported vCores - :vartype v_cores: long - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar supported_memory_per_vcore_mb: supported memory per vCore in MB - :vartype supported_memory_per_vcore_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'v_cores': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'supported_memory_per_vcore_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'v_cores': {'key': 'vCores', 'type': 'long'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'supported_memory_per_vcore_mb': {'key': 'supportedMemoryPerVcoreMB', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(VcoreCapability, self).__init__(**kwargs) - self.name = None - self.v_cores = None - self.supported_iops = None - self.supported_memory_per_vcore_mb = None - - -class VirtualNetworkSubnetUsageParameter(Model): - """Virtual network subnet usage parameter. - - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - """ - - _attribute_map = { - 'virtual_network_arm_resource_id': {'key': 'virtualNetworkArmResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkSubnetUsageParameter, self).__init__(**kwargs) - self.virtual_network_arm_resource_id = kwargs.get('virtual_network_arm_resource_id', None) - - -class VirtualNetworkSubnetUsageResult(Model): - """Virtual network subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar delegated_subnets_usage: - :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DelegatedSubnetUsage] - """ - - _validation = { - 'delegated_subnets_usage': {'readonly': True}, - } - - _attribute_map = { - 'delegated_subnets_usage': {'key': 'delegatedSubnetsUsage', 'type': '[DelegatedSubnetUsage]'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkSubnetUsageResult, self).__init__(**kwargs) - self.delegated_subnets_usage = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models_py3.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models_py3.py deleted file mode 100644 index 0b17e0404dc..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_models_py3.py +++ /dev/null @@ -1,1355 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Resource(Model): - """Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None - - -class CapabilityProperties(Model): - """Location capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar zone: zone name - :vartype zone: str - :ivar supported_flexible_server_editions: - :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerEditionCapability] - """ - - _validation = { - 'zone': {'readonly': True}, - 'supported_flexible_server_editions': {'readonly': True}, - } - - _attribute_map = { - 'zone': {'key': 'zone', 'type': 'str'}, - 'supported_flexible_server_editions': {'key': 'supportedFlexibleServerEditions', 'type': '[ServerEditionCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(CapabilityProperties, self).__init__(**kwargs) - self.zone = None - self.supported_flexible_server_editions = None - - -class CloudError(Model): - """An error response from the Batch service. - - :param error: - :type error: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. Possible values include: - 'Boolean', 'Numeric', 'Integer', 'Enumeration' - :vartype data_type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationDataType - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source - - -class DelegatedSubnetUsage(Model): - """Delegated subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subnet_name: name of the subnet - :vartype subnet_name: str - :ivar usage: Number of used delegated subnets - :vartype usage: long - """ - - _validation = { - 'subnet_name': {'readonly': True}, - 'usage': {'readonly': True}, - } - - _attribute_map = { - 'subnet_name': {'key': 'subnetName', 'type': 'str'}, - 'usage': {'key': 'usage', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(DelegatedSubnetUsage, self).__init__(**kwargs) - self.subnet_name = None - self.usage = None - - -class ErrorAdditionalInfo(Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(Model): - """The resource management error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class MaintenanceWindow(Model): - """Maintenance window of a server. - - :param custom_window: indicates whether custom window is enabled or - disabled - :type custom_window: str - :param start_hour: start hour for maintenance window - :type start_hour: int - :param start_minute: start minute for maintenance window - :type start_minute: int - :param day_of_week: day of week for maintenance window - :type day_of_week: int - """ - - _attribute_map = { - 'custom_window': {'key': 'customWindow', 'type': 'str'}, - 'start_hour': {'key': 'startHour', 'type': 'int'}, - 'start_minute': {'key': 'startMinute', 'type': 'int'}, - 'day_of_week': {'key': 'dayOfWeek', 'type': 'int'}, - } - - def __init__(self, *, custom_window: str=None, start_hour: int=None, start_minute: int=None, day_of_week: int=None, **kwargs) -> None: - super(MaintenanceWindow, self).__init__(**kwargs) - self.custom_window = custom_window - self.start_hour = start_hour - self.start_minute = start_minute - self.day_of_week = day_of_week - - -class NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param name: name of the PostgreSQL server. - :type name: str - :param type: type of the server - :type type: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, name: str=None, type: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.name = name - self.type = type - - -class NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationDisplay - :param is_data_action: Indicates whether the operation is a data action - :type is_data_action: bool - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, *, is_data_action: bool=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.is_data_action = is_data_action - self.origin = None - self.properties = None - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(Model): - """A list of resource provider operations. - - :param value: Collection of available operation details - :type value: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Operation] - :param next_link: URL client should use to fetch the next page (per server - side paging). - It's null for now, added for future use. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Plan(Model): - """Plan for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code - self.version = version - - -class ResourceModelWithAllowedPropertySet(Model): - """The resource model definition containing the full set of allowed properties - for a resource. Except properties bag, there cannot be a top level property - outside of this set. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.. - :vartype type: str - :param location: The geo-location where the resource lives - :type location: str - :param managed_by: The fully qualified resource ID of the resource that - manages this resource. Indicates if this resource is managed by another - azure resource. If this is present, complete mode deployment will not - delete the resource if it is removed from the template since it is managed - by another resource. - :type managed_by: str - :param kind: Metadata used by portal/tooling/etc to render different UX - experiences for resources of the same type; e.g. ApiApps are a kind of - Microsoft.Web/sites type. If supported, the resource provider must - validate and persist this value. - :type kind: str - :ivar etag: The etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal etag - convention. Entity tags are used for comparing two or more entities from - the same requested resource. HTTP/1.1 uses entity tags in the etag - (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - and If-Range (section 14.27) header fields. - :vartype etag: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param identity: - :type identity: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetIdentity - :param sku: - :type sku: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetSku - :param plan: - :type plan: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceModelWithAllowedPropertySetPlan - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_by': {'key': 'managedBy', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, - 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, - 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, - } - - def __init__(self, *, location: str=None, managed_by: str=None, kind: str=None, tags=None, identity=None, sku=None, plan=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.managed_by = managed_by - self.kind = kind - self.etag = None - self.tags = tags - self.identity = identity - self.sku = sku - self.plan = plan - - -class ResourceModelWithAllowedPropertySetIdentity(Identity): - """ResourceModelWithAllowedPropertySetIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(type=type, **kwargs) - - -class ResourceModelWithAllowedPropertySetPlan(Plan): - """ResourceModelWithAllowedPropertySetPlan. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. A user defined name of the 3rd Party Artifact that - is being procured. - :type name: str - :param publisher: Required. The publisher of the 3rd Party Artifact that - is being bought. E.g. NewRelic - :type publisher: str - :param product: Required. The 3rd Party artifact that is being procured. - E.g. NewRelic. Product maps to the OfferID specified for the artifact at - the time of Data Market onboarding. - :type product: str - :param promotion_code: A publisher provided promotion code as provisioned - in Data Market for the said product/artifact. - :type promotion_code: str - :param version: The version of the desired product/artifact. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetPlan, self).__init__(name=name, publisher=publisher, product=product, promotion_code=promotion_code, version=version, **kwargs) - - -class Sku(Model): - """Sku information related properties of a server. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. Standard_D4s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. Burstable. - Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ResourceModelWithAllowedPropertySetSku(Sku): - """ResourceModelWithAllowedPropertySetSku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the sku, typically, tier + family + - cores, e.g. Standard_D4s_v3. - :type name: str - :param tier: Required. The tier of the particular SKU, e.g. Burstable. - Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier, **kwargs) -> None: - super(ResourceModelWithAllowedPropertySetSku, self).__init__(name=name, tier=tier, **kwargs) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param identity: The Azure Active Directory identity of the server. - :type identity: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Identity - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param administrator_login_password: The administrator login password - (required for server creation). - :type administrator_login_password: str - :param version: PostgreSQL Server version. Possible values include: '12', - '11' - :type version: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersion - :ivar state: A state of a server that is visible to user. Possible values - include: 'Ready', 'Dropping', 'Disabled', 'Starting', 'Stopping', - 'Stopped', 'Updating' - :vartype state: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerState - :ivar ha_state: A state of a HA server that is visible to user. Possible - values include: 'NotEnabled', 'CreatingStandby', 'ReplicatingData', - 'FailingOver', 'Healthy', 'RemovingStandby' - :vartype ha_state: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerHAState - :ivar fully_qualified_domain_name: The fully qualified domain name of a - server. - :vartype fully_qualified_domain_name: str - :param display_name: The display name of a server. - :type display_name: str - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile - :ivar public_network_access: public network access is enabled or not. - Possible values include: 'Enabled', 'Disabled' - :vartype public_network_access: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPublicNetworkAccessState - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow - :param ha_enabled: stand by count value can be either enabled or disabled. - Possible values include: 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum - :param source_server_name: The source PostgreSQL server name to restore - from. - :type source_server_name: str - :param point_in_time_utc: Restore point creation time (ISO8601 format), - specifying the time to restore from. - :type point_in_time_utc: datetime - :param availability_zone: availability Zone information of the server. - :type availability_zone: str - :ivar standby_availability_zone: availability Zone information of the - server. - :vartype standby_availability_zone: str - :ivar byok_enforcement: Status showing whether the data encryption is - enabled with customer-managed keys. - :vartype byok_enforcement: str - :param delegated_subnet_arguments: - :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPropertiesDelegatedSubnetArguments - :param create_mode: The mode to create a new PostgreSQL server. Possible - values include: 'Default', 'PointInTimeRestore' - :type create_mode: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.CreateMode - :param server_tags: Application-specific metadata in the form of key-value - pairs. - :type server_tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'state': {'readonly': True}, - 'ha_state': {'readonly': True}, - 'fully_qualified_domain_name': {'readonly': True}, - 'public_network_access': {'readonly': True}, - 'standby_availability_zone': {'readonly': True}, - 'byok_enforcement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'ha_state': {'key': 'properties.haState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'HAEnabledEnum'}, - 'source_server_name': {'key': 'properties.sourceServerName', 'type': 'str'}, - 'point_in_time_utc': {'key': 'properties.pointInTimeUTC', 'type': 'iso-8601'}, - 'availability_zone': {'key': 'properties.availabilityZone', 'type': 'str'}, - 'standby_availability_zone': {'key': 'properties.standbyAvailabilityZone', 'type': 'str'}, - 'byok_enforcement': {'key': 'properties.byokEnforcement', 'type': 'str'}, - 'delegated_subnet_arguments': {'key': 'properties.delegatedSubnetArguments', 'type': 'ServerPropertiesDelegatedSubnetArguments'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'server_tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, version=None, display_name: str=None, storage_profile=None, maintenance_window=None, ha_enabled=None, source_server_name: str=None, point_in_time_utc=None, availability_zone: str=None, delegated_subnet_arguments=None, create_mode=None, server_tags=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.sku = sku - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.version = version - self.state = None - self.ha_state = None - self.fully_qualified_domain_name = None - self.display_name = display_name - self.storage_profile = storage_profile - self.public_network_access = None - self.maintenance_window = maintenance_window - self.ha_enabled = ha_enabled - self.source_server_name = source_server_name - self.point_in_time_utc = point_in_time_utc - self.availability_zone = availability_zone - self.standby_availability_zone = None - self.byok_enforcement = None - self.delegated_subnet_arguments = delegated_subnet_arguments - self.create_mode = create_mode - self.server_tags = server_tags - - -class ServerEditionCapability(Model): - """Server edition capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Server edition name - :vartype name: str - :ivar supported_storage_editions: - :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageEditionCapability] - :ivar supported_server_versions: - :vartype supported_server_versions: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersionCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_editions': {'readonly': True}, - 'supported_server_versions': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_editions': {'key': 'supportedStorageEditions', 'type': '[StorageEditionCapability]'}, - 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_editions = None - self.supported_server_versions = None - - -class ServerForUpdate(Model): - """Represents a server to be updated. - - :param location: The location the resource resides in. - :type location: str - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param storage_profile: Storage profile of a server. - :type storage_profile: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile - :param ha_enabled: stand by count value can be either enabled or disabled. - Possible values include: 'Enabled', 'Disabled' - :type ha_enabled: str or - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum - :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'ha_enabled': {'key': 'properties.haEnabled', 'type': 'HAEnabledEnum'}, - 'maintenance_window': {'key': 'properties.maintenanceWindow', 'type': 'MaintenanceWindow'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, sku=None, administrator_login_password: str=None, storage_profile=None, ha_enabled=None, maintenance_window=None, tags=None, **kwargs) -> None: - super(ServerForUpdate, self).__init__(**kwargs) - self.location = location - self.sku = sku - self.administrator_login_password = administrator_login_password - self.storage_profile = storage_profile - self.ha_enabled = ha_enabled - self.maintenance_window = maintenance_window - self.tags = tags - - -class ServerPropertiesDelegatedSubnetArguments(Model): - """ServerPropertiesDelegatedSubnetArguments. - - :param subnet_arm_resource_id: delegated subnet arm resource id. - :type subnet_arm_resource_id: str - """ - - _attribute_map = { - 'subnet_arm_resource_id': {'key': 'subnetArmResourceId', 'type': 'str'}, - } - - def __init__(self, *, subnet_arm_resource_id: str=None, **kwargs) -> None: - super(ServerPropertiesDelegatedSubnetArguments, self).__init__(**kwargs) - self.subnet_arm_resource_id = subnet_arm_resource_id - - -class ServerVersionCapability(Model): - """Server version capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: server version - :vartype name: str - :ivar supported_vcores: - :vartype supported_vcores: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.VcoreCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_vcores': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_vcores': {'key': 'supportedVcores', 'type': '[VcoreCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(ServerVersionCapability, self).__init__(**kwargs) - self.name = None - self.supported_vcores = None - - -class StorageEditionCapability(Model): - """storage edition capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage edition name - :vartype name: str - :ivar supported_storage_mb: - :vartype supported_storage_mb: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageMBCapability] - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_storage_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_storage_mb': {'key': 'supportedStorageMB', 'type': '[StorageMBCapability]'}, - } - - def __init__(self, **kwargs) -> None: - super(StorageEditionCapability, self).__init__(**kwargs) - self.name = None - self.supported_storage_mb = None - - -class StorageMBCapability(Model): - """storage size in MB capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: storage MB name - :vartype name: str - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar storage_size_mb: storage size in MB - :vartype storage_size_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'storage_size_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'storage_size_mb': {'key': 'storageSizeMB', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(StorageMBCapability, self).__init__(**kwargs) - self.name = None - self.supported_iops = None - self.storage_size_mb = None - - -class StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - } - - def __init__(self, *, backup_retention_days: int=None, storage_mb: int=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.storage_mb = storage_mb - - -class VcoreCapability(Model): - """Vcores capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: vCore name - :vartype name: str - :ivar v_cores: supported vCores - :vartype v_cores: long - :ivar supported_iops: supported IOPS - :vartype supported_iops: long - :ivar supported_memory_per_vcore_mb: supported memory per vCore in MB - :vartype supported_memory_per_vcore_mb: long - """ - - _validation = { - 'name': {'readonly': True}, - 'v_cores': {'readonly': True}, - 'supported_iops': {'readonly': True}, - 'supported_memory_per_vcore_mb': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'v_cores': {'key': 'vCores', 'type': 'long'}, - 'supported_iops': {'key': 'supportedIops', 'type': 'long'}, - 'supported_memory_per_vcore_mb': {'key': 'supportedMemoryPerVcoreMB', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(VcoreCapability, self).__init__(**kwargs) - self.name = None - self.v_cores = None - self.supported_iops = None - self.supported_memory_per_vcore_mb = None - - -class VirtualNetworkSubnetUsageParameter(Model): - """Virtual network subnet usage parameter. - - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - """ - - _attribute_map = { - 'virtual_network_arm_resource_id': {'key': 'virtualNetworkArmResourceId', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_arm_resource_id: str=None, **kwargs) -> None: - super(VirtualNetworkSubnetUsageParameter, self).__init__(**kwargs) - self.virtual_network_arm_resource_id = virtual_network_arm_resource_id - - -class VirtualNetworkSubnetUsageResult(Model): - """Virtual network subnet usage data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar delegated_subnets_usage: - :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DelegatedSubnetUsage] - """ - - _validation = { - 'delegated_subnets_usage': {'readonly': True}, - } - - _attribute_map = { - 'delegated_subnets_usage': {'key': 'delegatedSubnetsUsage', 'type': '[DelegatedSubnetUsage]'}, - } - - def __init__(self, **kwargs) -> None: - super(VirtualNetworkSubnetUsageResult, self).__init__(**kwargs) - self.delegated_subnets_usage = None diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_paged_models.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_paged_models.py deleted file mode 100644 index 9aebc4f3908..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) -class FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) -class ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) -class CapabilityPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`CapabilityProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CapabilityProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(CapabilityPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py deleted file mode 100644 index 5bb5096430c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ServerVersion(str, Enum): - - one_two = "12" - one_one = "11" - - -class ServerState(str, Enum): - - ready = "Ready" - dropping = "Dropping" - disabled = "Disabled" - starting = "Starting" - stopping = "Stopping" - stopped = "Stopped" - updating = "Updating" - - -class ServerHAState(str, Enum): - - not_enabled = "NotEnabled" - creating_standby = "CreatingStandby" - replicating_data = "ReplicatingData" - failing_over = "FailingOver" - healthy = "Healthy" - removing_standby = "RemovingStandby" - - -class ServerPublicNetworkAccessState(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class HAEnabledEnum(str, Enum): - - enabled = "Enabled" - disabled = "Disabled" - - -class CreateMode(str, Enum): - - default = "Default" - point_in_time_restore = "PointInTimeRestore" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - - -class SkuTier(str, Enum): - - burstable = "Burstable" - general_purpose = "GeneralPurpose" - memory_optimized = "MemoryOptimized" - - -class ConfigurationDataType(str, Enum): - - boolean = "Boolean" - numeric = "Numeric" - integer = "Integer" - enumeration = "Enumeration" - - -class OperationOrigin(str, Enum): - - not_specified = "NotSpecified" - user = "user" - system = "system" diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/__init__.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/__init__.py deleted file mode 100644 index 2b34596e6d4..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._servers_operations import ServersOperations -from ._firewall_rules_operations import FirewallRulesOperations -from ._configurations_operations import ConfigurationsOperations -from ._check_name_availability_operations import CheckNameAvailabilityOperations -from ._location_based_capabilities_operations import LocationBasedCapabilitiesOperations -from ._virtual_network_subnet_usage_operations import VirtualNetworkSubnetUsageOperations -from ._operations import Operations - -__all__ = [ - 'ServersOperations', - 'FirewallRulesOperations', - 'ConfigurationsOperations', - 'CheckNameAvailabilityOperations', - 'LocationBasedCapabilitiesOperations', - 'VirtualNetworkSubnetUsageOperations', - 'Operations', -] diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_check_name_availability_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_check_name_availability_operations.py deleted file mode 100644 index d7b1c22485c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_check_name_availability_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CheckNameAvailabilityOperations(object): - """CheckNameAvailabilityOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - def execute( - self, name, type=None, custom_headers=None, raw=False, **operation_config): - """Check the availability of name for resource. - - :param name: Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.NameAvailability - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - name_availability_request = models.NameAvailabilityRequest(name=name, type=type) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_availability_request, 'NameAvailabilityRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/checkNameAvailability'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_configurations_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_configurations_operations.py deleted file mode 100644 index 3dada1efe67..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_configurations_operations.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ConfigurationsOperations(object): - """ConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the configurations in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Configuration - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations'} - - def get( - self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a configuration of server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Configuration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}'} - - - def _update_initial( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, **operation_config): - parameters = models.Configuration(value=value, source=source) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Configuration') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates a configuration of a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param configuration_name: The name of the server configuration. - :type configuration_name: str - :param value: Value of the configuration. - :type value: str - :param source: Source of the configuration. - :type source: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Configuration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - configuration_name=configuration_name, - value=value, - source=source, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Configuration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_firewall_rules_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_firewall_rules_operations.py deleted file mode 100644 index 3a99844f809..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_firewall_rules_operations.py +++ /dev/null @@ -1,379 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class FirewallRulesOperations(object): - """FirewallRulesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, **operation_config): - parameters = models.FirewallRule(start_ip_address=start_ip_address, end_ip_address=end_ip_address) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'FirewallRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - if response.status_code == 201: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new firewall rule or updates an existing firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param start_ip_address: The start IP address of the server firewall - rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: The end IP address of the server firewall rule. - Must be IPv4 format. - :type end_ip_address: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FirewallRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - start_ip_address=start_ip_address, - end_ip_address=end_ip_address, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - - def _delete_initial( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a PostgreSQL server firewall rule. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - firewall_rule_name=firewall_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - def get( - self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param firewall_rule_name: The name of the server firewall rule. - :type firewall_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FirewallRule or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FirewallRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}'} - - def list_by_server( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """List all the firewall rules in a given PostgreSQL server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of FirewallRule - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRulePaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_server.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py deleted file mode 100644 index 81e4ebf783c..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationBasedCapabilitiesOperations(object): - """LocationBasedCapabilitiesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - def execute( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Get capabilities at specified location in a given subscription. - - :param location_name: The name of the location. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CapabilityProperties - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilityPropertiesPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilityProperties] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CapabilityPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/capabilities'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_operations.py deleted file mode 100644 index d44e5a106b2..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_operations.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DBForPostgreSql/operations'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_servers_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_servers_operations.py deleted file mode 100644 index 866aeadd325..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_servers_operations.py +++ /dev/null @@ -1,768 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ServersOperations(object): - """ServersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - - def _create_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Server') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - if response.status_code == 201: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for creating or updating a - server. - :type parameters: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}'} - - - def _update_initial( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ServerForUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing server. The request body can contain one to many of - the properties present in the normal server definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param parameters: The required parameters for updating a server. - :type parameters: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerForUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Server or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - server_name=server_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}'} - - - def _delete_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}'} - - def get( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - """Gets information about a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Server or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Server', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all the servers in a given subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Server - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/flexibleServers'} - - - def _restart_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/restart'} - - - def _start_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/start'} - - - def _stop_initial( - self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'serverName': self._serialize.url("server_name", server_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a server. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - server_name=server_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/stop'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py deleted file mode 100644 index 0bdb74b051a..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class VirtualNetworkSubnetUsageOperations(object): - """VirtualNetworkSubnetUsageOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-02-14-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-14-preview" - - self.config = config - - def execute( - self, location_name, virtual_network_arm_resource_id=None, custom_headers=None, raw=False, **operation_config): - """Get virtual network subnet usage for a given vNet resource id. - - :param location_name: The name of the location. - :type location_name: str - :param virtual_network_arm_resource_id: Virtual network resource id. - :type virtual_network_arm_resource_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetworkSubnetUsageResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.rdbms.postgresql_flexibleservers.models.VirtualNetworkSubnetUsageResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.VirtualNetworkSubnetUsageParameter(virtual_network_arm_resource_id=virtual_network_arm_resource_id) - - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'VirtualNetworkSubnetUsageParameter') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkSubnetUsageResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/checkVirtualNetworkSubnetUsage'} diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/version.py deleted file mode 100644 index a2a5a28346e..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/postgresql_flexibleservers/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-02-14-privatepreview" - diff --git a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/version.py b/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/version.py deleted file mode 100644 index f47cd0a6030..00000000000 --- a/src/rdbms-connect/azext_rdbms_connect/vendored_sdks/version.py +++ /dev/null @@ -1,8 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -VERSION = "3.1.0rc1" From 4ae563c22cf1ff16bc73786c45a1f49a71e07d3e Mon Sep 17 00:00:00 2001 From: kai ru <69238381+kairu-ms@users.noreply.github.com> Date: Wed, 16 Jun 2021 10:32:39 +0800 Subject: [PATCH 35/37] [AMCS] Release new version (#3495) * [AMCS] Release new version * Update HISTORY.rst * Update HISTORY.rst --- src/monitor-control-service/HISTORY.rst | 5 +++++ src/monitor-control-service/setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/monitor-control-service/HISTORY.rst b/src/monitor-control-service/HISTORY.rst index 1c139576ba0..593fde973cc 100644 --- a/src/monitor-control-service/HISTORY.rst +++ b/src/monitor-control-service/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.2.0 +++++++ +* GA release. +* Add `az monitor data-collection endpoint` command group. + 0.1.0 ++++++ * Initial release. diff --git a/src/monitor-control-service/setup.py b/src/monitor-control-service/setup.py index db8792e9852..901fb022f95 100644 --- a/src/monitor-control-service/setup.py +++ b/src/monitor-control-service/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.0' +VERSION = '0.2.0' try: from azext_amcs.manual.version import VERSION except ImportError: From 3a3d49c2c0dc81a67e3018fbd1f8f77053a0ffd4 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 16 Jun 2021 10:33:26 +0800 Subject: [PATCH 36/37] [Release] Update index.json for extension [ resource-graph ] (#3510) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=949151 Last commit: https://github.com/Azure/azure-cli-extensions/commit/cb599bfad5dcdfd055368d07b3c121f6e50a9b60 --- src/index.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/index.json b/src/index.json index 600bb19906a..61c051b07e1 100644 --- a/src/index.json +++ b/src/index.json @@ -15263,6 +15263,56 @@ "version": "2.0.0" }, "sha256Digest": "3bda3548bd742ad24b84d5a81f58aaf47f0d7b97f4a04d5a5b405715f850a31c" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/resource_graph-2.1.0-py2.py3-none-any.whl", + "filename": "resource_graph-2.1.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.22.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License" + ], + "description_content_type": "text/markdown", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "ilidemi@microsoft.com", + "name": "Ilia Demianenko", + "role": "author" + }, + { + "email": "earc@microsoft.com", + "name": "Azure Resource Graph", + "role": "maintainer" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/resource-graph" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "resource-graph", + "summary": "Support for querying Azure resources with Resource Graph.", + "version": "2.1.0" + }, + "sha256Digest": "62c81e3d62ce60c5a0a485829d00bdb0c733145ee93fb6098c14e3b27ee27c40" } ], "resource-mover": [ From ff20effe1c4aca1dc71bf57251685e43a3f0a646 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 16 Jun 2021 10:50:06 +0800 Subject: [PATCH 37/37] [Release] Update index.json for extension [ monitor-control-service ] (#3511) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=949201 Last commit: https://github.com/Azure/azure-cli-extensions/commit/4ae563c22cf1ff16bc73786c45a1f49a71e07d3e --- src/index.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/index.json b/src/index.json index 61c051b07e1..487eddb108f 100644 --- a/src/index.json +++ b/src/index.json @@ -13906,6 +13906,48 @@ "version": "0.1.0" }, "sha256Digest": "71604e21a29c5bd84916a890cdf6e09dd7a0623867871d5ac8a0f5c2bed179dd" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/monitor_control_service-0.2.0-py3-none-any.whl", + "filename": "monitor_control_service-0.2.0-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/monitor-control-service" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "monitor-control-service", + "summary": "Microsoft Azure Command-Line Tools MonitorClient Extension", + "version": "0.2.0" + }, + "sha256Digest": "a9996879f536220d71b5fe21e366ad22e4898e73761a8013d59981ebae6f0b21" } ], "netappfiles-preview": [